summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-12-08 20:01:02 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2022-12-08 20:01:02 +0530
commit8a0e98774354cf1b460e2db8ed9fdd9f6a5fab4a (patch)
tree17c4224246626f24265fd0ff067e85603af7bc7f /app/src/main/java
parente949ab94a5c603d6ae5e81d558ce17a89ab4fd7b (diff)
chore: fix issues flagged by Lint
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/app/passwordstore/util/services/ClipboardService.kt8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/src/main/java/app/passwordstore/util/services/ClipboardService.kt b/app/src/main/java/app/passwordstore/util/services/ClipboardService.kt
index 76128a50..e1771386 100644
--- a/app/src/main/java/app/passwordstore/util/services/ClipboardService.kt
+++ b/app/src/main/java/app/passwordstore/util/services/ClipboardService.kt
@@ -4,6 +4,7 @@
*/
package app.passwordstore.util.services
+import android.annotation.SuppressLint
import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
@@ -116,6 +117,7 @@ class ClipboardService : Service() {
}
}
+ @SuppressLint("UnspecifiedImmutableFlag") // The offending code path cannot be hit on S
private fun createNotification(clearTime: Int) {
val clearTimeMs = clearTime * 1000L
val clearIntent = Intent(this, ClipboardService::class.java).apply { action = ACTION_CLEAR }
@@ -136,11 +138,7 @@ class ClipboardService : Service() {
this,
0,
clearIntent,
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
- } else {
- PendingIntent.FLAG_UPDATE_CURRENT
- },
+ PendingIntent.FLAG_UPDATE_CURRENT,
)
}
val notification =