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"?>
|
<?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">
|
<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
|
<issue
|
||||||
id="VectorRaster"
|
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"
|
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,
|
context,
|
||||||
decryptFileRequestCode++,
|
decryptFileRequestCode++,
|
||||||
intent,
|
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
|
.intentSender
|
||||||
}
|
}
|
||||||
|
@ -147,15 +151,11 @@ class AutofillDecryptActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun executeOpenPgpApi(
|
private suspend fun executeOpenPgpApi(
|
||||||
data: Intent,
|
data: Intent,
|
||||||
input: InputStream,
|
input: InputStream,
|
||||||
output: OutputStream
|
output: OutputStream
|
||||||
): Intent? {
|
): Intent {
|
||||||
var openPgpServiceConnection: OpenPgpServiceConnection? = null
|
var openPgpServiceConnection: OpenPgpServiceConnection? = null
|
||||||
val openPgpService =
|
val openPgpService =
|
||||||
suspendCoroutine<IOpenPgpService2> { cont ->
|
suspendCoroutine<IOpenPgpService2> { cont ->
|
||||||
|
@ -196,7 +196,7 @@ class AutofillDecryptActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
.onSuccess { result ->
|
.onSuccess { result ->
|
||||||
return when (val resultCode =
|
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 -> {
|
OpenPgpApi.RESULT_CODE_SUCCESS -> {
|
||||||
runCatching {
|
runCatching {
|
||||||
|
|
|
@ -67,7 +67,11 @@ class AutofillDecryptActivityV2 : AppCompatActivity() {
|
||||||
context,
|
context,
|
||||||
decryptFileRequestCode++,
|
decryptFileRequestCode++,
|
||||||
intent,
|
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
|
.intentSender
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,11 @@ class AutofillFilterView : AppCompatActivity() {
|
||||||
context,
|
context,
|
||||||
matchAndDecryptFileRequestCode++,
|
matchAndDecryptFileRequestCode++,
|
||||||
intent,
|
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
|
.intentSender
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,11 @@ class AutofillPublisherChangedActivity : AppCompatActivity() {
|
||||||
context,
|
context,
|
||||||
publisherChangedRequestCode++,
|
publisherChangedRequestCode++,
|
||||||
intent,
|
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
|
.intentSender
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,11 @@ fun makeInlinePresentation(
|
||||||
context,
|
context,
|
||||||
0,
|
0,
|
||||||
Intent(context, PasswordStore::class.java),
|
Intent(context, PasswordStore::class.java),
|
||||||
PendingIntent.FLAG_MUTABLE
|
if (Build.VERSION.SDK_INT >= 31) {
|
||||||
|
PendingIntent.FLAG_MUTABLE
|
||||||
|
} else {
|
||||||
|
0
|
||||||
|
},
|
||||||
)
|
)
|
||||||
val slice =
|
val slice =
|
||||||
InlineSuggestionUi.newContentBuilder(launchIntent).run {
|
InlineSuggestionUi.newContentBuilder(launchIntent).run {
|
||||||
|
|
|
@ -119,7 +119,11 @@ class ClipboardService : Service() {
|
||||||
this,
|
this,
|
||||||
0,
|
0,
|
||||||
clearIntent,
|
clearIntent,
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
|
if (Build.VERSION.SDK_INT >= 31) {
|
||||||
|
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
|
||||||
|
} else {
|
||||||
|
PendingIntent.FLAG_UPDATE_CURRENT
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val notification =
|
val notification =
|
||||||
|
|
Loading…
Reference in a new issue