summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-01-10 00:31:03 +0530
committerGitHub <noreply@github.com>2022-01-09 19:01:03 +0000
commitcfceb38ee72896dad3701dcf3f12d8480166e009 (patch)
treebf6fca975c92e2756d0a5cb6a527300193cbc7ea /app/src/main/java
parent35155e55841bc87b2c0e0dc577e1433041b44bc5 (diff)
Fix a bunch of Lint warnings and errors (#1655)
* autofill-parser: add missing `@RequiresApi` annotations * app: remove unused strings and sync with Crowdin * app: remove unused chip_text_color selector * app: remove unused capitalization_type_values array * app: add `PendingIntent.FLAG_IMMUTABLE` flag where required
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt2
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt2
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt2
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillPublisherChangedActivity.kt2
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/util/autofill/AutofillViewUtils.kt7
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/util/services/ClipboardService.kt7
6 files changed, 16 insertions, 6 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt
index 282864e1..3ea11982 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt
@@ -79,7 +79,7 @@ class AutofillDecryptActivity : AppCompatActivity() {
context,
decryptFileRequestCode++,
intent,
- PendingIntent.FLAG_CANCEL_CURRENT
+ PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE,
)
.intentSender
}
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt
index 697d628d..4401308a 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt
@@ -67,7 +67,7 @@ class AutofillDecryptActivityV2 : AppCompatActivity() {
context,
decryptFileRequestCode++,
intent,
- PendingIntent.FLAG_CANCEL_CURRENT
+ PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE,
)
.intentSender
}
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt
index 55f3fc11..7b3477cd 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt
@@ -74,7 +74,7 @@ class AutofillFilterView : AppCompatActivity() {
context,
matchAndDecryptFileRequestCode++,
intent,
- PendingIntent.FLAG_CANCEL_CURRENT
+ PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE,
)
.intentSender
}
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillPublisherChangedActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillPublisherChangedActivity.kt
index e37ebf5e..00a39dc0 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillPublisherChangedActivity.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillPublisherChangedActivity.kt
@@ -54,7 +54,7 @@ class AutofillPublisherChangedActivity : AppCompatActivity() {
context,
publisherChangedRequestCode++,
intent,
- PendingIntent.FLAG_CANCEL_CURRENT
+ PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE,
)
.intentSender
}
diff --git a/app/src/main/java/dev/msfjarvis/aps/util/autofill/AutofillViewUtils.kt b/app/src/main/java/dev/msfjarvis/aps/util/autofill/AutofillViewUtils.kt
index 1d09d001..5a224f39 100644
--- a/app/src/main/java/dev/msfjarvis/aps/util/autofill/AutofillViewUtils.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/util/autofill/AutofillViewUtils.kt
@@ -52,7 +52,12 @@ fun makeInlinePresentation(
if (UiVersions.INLINE_UI_VERSION_1 !in UiVersions.getVersions(imeSpec.style)) return null
val launchIntent =
- PendingIntent.getActivity(context, 0, Intent(context, PasswordStore::class.java), 0)
+ PendingIntent.getActivity(
+ context,
+ 0,
+ Intent(context, PasswordStore::class.java),
+ PendingIntent.FLAG_IMMUTABLE
+ )
val slice =
InlineSuggestionUi.newContentBuilder(launchIntent).run {
setTitle(metadata.title)
diff --git a/app/src/main/java/dev/msfjarvis/aps/util/services/ClipboardService.kt b/app/src/main/java/dev/msfjarvis/aps/util/services/ClipboardService.kt
index 84de5c91..808089ab 100644
--- a/app/src/main/java/dev/msfjarvis/aps/util/services/ClipboardService.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/util/services/ClipboardService.kt
@@ -115,7 +115,12 @@ class ClipboardService : Service() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
PendingIntent.getForegroundService(this, 0, clearIntent, PendingIntent.FLAG_UPDATE_CURRENT)
} else {
- PendingIntent.getService(this, 0, clearIntent, PendingIntent.FLAG_UPDATE_CURRENT)
+ PendingIntent.getService(
+ this,
+ 0,
+ clearIntent,
+ PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
+ )
}
val notification =
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {