Skip to content

Commit dd0f759

Browse files
committed
fix: suppress the pre-34 tile lint error
The Intent overload of startActivityAndCollapse is the only one available below API 34; the Kotlin deprecation suppression does not cover Android Lint's dedicated check, which fails the build.
1 parent 920d40e commit dd0f759

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/src/main/kotlin/me/spoo/android/ShortenTileService.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package me.spoo.android
22

3+
import android.annotation.SuppressLint
34
import android.app.PendingIntent
45
import android.content.Intent
56
import android.os.Build
@@ -8,6 +9,8 @@ import android.service.quicksettings.TileService
89
/** "Shorten clipboard URL" quick-settings tile. */
910
class ShortenTileService : TileService() {
1011

12+
// The Intent overload is the only one below API 34.
13+
@SuppressLint("StartActivityAndCollapseDeprecated")
1114
override fun onClick() {
1215
val intent = Intent(this, ClipboardTrampolineActivity::class.java)
1316
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)

0 commit comments

Comments
 (0)