diff options
| author | Harsh Shandilya <me@msfjarvis.dev> | 2022-04-24 16:06:48 +0530 |
|---|---|---|
| committer | Harsh Shandilya <me@msfjarvis.dev> | 2022-04-24 16:47:50 +0530 |
| commit | 95f16cbf5afef3c55ed23bbad615607954db50d3 (patch) | |
| tree | fd9a2de1030390262688b71192dbada12bbed823 /app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt | |
| parent | 9cae158e3469be142aae1c38c511a34201b52dc0 (diff) | |
| download | HardenedPass-95f16cbf5afef3c55ed23bbad615607954db50d3.tar.gz HardenedPass-95f16cbf5afef3c55ed23bbad615607954db50d3.zip | |
app: address InlinedApi lint
Diffstat (limited to 'app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt')
| -rw-r--r-- | app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt | 14 |
1 files changed, 7 insertions, 7 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 b6b8a78a..291c654f 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 @@ -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 { |
