app: address InlinedApi lint
This commit is contained in:
parent
9cae158e34
commit
95f16cbf5a
7 changed files with 32 additions and 78 deletions
|
@ -1,72 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="6" by="lint 7.1.3" type="baseline" client="gradle" dependencies="false" name="AGP (7.1.3)" variant="all" version="7.1.3">
|
||||
|
||||
<issue
|
||||
id="InlinedApi"
|
||||
message="Field requires API level 31 (current min is 26): `android.app.PendingIntent#FLAG_MUTABLE`"
|
||||
errorLine1=" PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE,"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt"
|
||||
line="81"
|
||||
column="48"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="InlinedApi"
|
||||
message="Field requires API level 31 (current min is 26): `android.app.PendingIntent#FLAG_MUTABLE`"
|
||||
errorLine1=" PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE,"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivityV2.kt"
|
||||
line="70"
|
||||
column="48"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="InlinedApi"
|
||||
message="Field requires API level 31 (current min is 26): `android.app.PendingIntent#FLAG_MUTABLE`"
|
||||
errorLine1=" PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE,"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillFilterView.kt"
|
||||
line="77"
|
||||
column="48"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="InlinedApi"
|
||||
message="Field requires API level 31 (current min is 26): `android.app.PendingIntent#FLAG_MUTABLE`"
|
||||
errorLine1=" PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE,"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillPublisherChangedActivity.kt"
|
||||
line="57"
|
||||
column="48"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="InlinedApi"
|
||||
message="Field requires API level 31 (current min is 23): `android.app.PendingIntent#FLAG_MUTABLE`"
|
||||
errorLine1=" PendingIntent.FLAG_MUTABLE"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/dev/msfjarvis/aps/util/autofill/AutofillViewUtils.kt"
|
||||
line="59"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="InlinedApi"
|
||||
message="Field requires API level 31 (current min is 23): `android.app.PendingIntent#FLAG_MUTABLE`"
|
||||
errorLine1=" PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/dev/msfjarvis/aps/util/services/ClipboardService.kt"
|
||||
line="122"
|
||||
column="48"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="VectorRaster"
|
||||
message="Resource references will not work correctly in images generated for this vector icon for API < 24; check generated icon to make sure it looks acceptable"
|
||||
|
|
|
@ -78,7 +78,11 @@ class AutofillDecryptActivity : AppCompatActivity() {
|
|||
context,
|
||||
decryptFileRequestCode++,
|
||||
intent,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE,
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||
} else {
|
||||
PendingIntent.FLAG_CANCEL_CURRENT
|
||||
},
|
||||
)
|
||||
.intentSender
|
||||
}
|
||||
|
@ -147,15 +151,11 @@ class AutofillDecryptActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
private suspend fun executeOpenPgpApi(
|
||||
data: Intent,
|
||||
input: InputStream,
|
||||
output: OutputStream
|
||||
): Intent? {
|
||||
): Intent {
|
||||
var openPgpServiceConnection: OpenPgpServiceConnection? = null
|
||||
val openPgpService =
|
||||
suspendCoroutine<IOpenPgpService2> { cont ->
|
||||
|
@ -196,7 +196,7 @@ class AutofillDecryptActivity : AppCompatActivity() {
|
|||
}
|
||||
.onSuccess { result ->
|
||||
return when (val resultCode =
|
||||
result?.getIntExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR)
|
||||
result.getIntExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR)
|
||||
) {
|
||||
OpenPgpApi.RESULT_CODE_SUCCESS -> {
|
||||
runCatching {
|
||||
|
|
|
@ -67,7 +67,11 @@ class AutofillDecryptActivityV2 : AppCompatActivity() {
|
|||
context,
|
||||
decryptFileRequestCode++,
|
||||
intent,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE,
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||
} else {
|
||||
PendingIntent.FLAG_CANCEL_CURRENT
|
||||
},
|
||||
)
|
||||
.intentSender
|
||||
}
|
||||
|
|
|
@ -74,7 +74,11 @@ class AutofillFilterView : AppCompatActivity() {
|
|||
context,
|
||||
matchAndDecryptFileRequestCode++,
|
||||
intent,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE,
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||
} else {
|
||||
PendingIntent.FLAG_CANCEL_CURRENT
|
||||
},
|
||||
)
|
||||
.intentSender
|
||||
}
|
||||
|
|
|
@ -54,7 +54,11 @@ class AutofillPublisherChangedActivity : AppCompatActivity() {
|
|||
context,
|
||||
publisherChangedRequestCode++,
|
||||
intent,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE,
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||
} else {
|
||||
PendingIntent.FLAG_CANCEL_CURRENT
|
||||
},
|
||||
)
|
||||
.intentSender
|
||||
}
|
||||
|
|
|
@ -56,7 +56,11 @@ fun makeInlinePresentation(
|
|||
context,
|
||||
0,
|
||||
Intent(context, PasswordStore::class.java),
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
PendingIntent.FLAG_MUTABLE
|
||||
} else {
|
||||
0
|
||||
},
|
||||
)
|
||||
val slice =
|
||||
InlineSuggestionUi.newContentBuilder(launchIntent).run {
|
||||
|
|
|
@ -119,7 +119,11 @@ class ClipboardService : Service() {
|
|||
this,
|
||||
0,
|
||||
clearIntent,
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||
} else {
|
||||
PendingIntent.FLAG_UPDATE_CURRENT
|
||||
},
|
||||
)
|
||||
}
|
||||
val notification =
|
||||
|
|
Loading…
Reference in a new issue