diff options
| author | Harsh Shandilya <me@msfjarvis.dev> | 2022-04-25 10:47:02 +0530 |
|---|---|---|
| committer | Harsh Shandilya <me@msfjarvis.dev> | 2022-04-25 10:47:02 +0530 |
| commit | aaf6ceb8ecbc71f6948c84b1a19fb83abfe8a418 (patch) | |
| tree | f688f0bf69ce4db3781cf40c76d4315165f8c24e /app/src/main/java/dev/msfjarvis/aps/ui/autofill/AutofillDecryptActivity.kt | |
| parent | 11720e95429f03be7a4903989fbd011dd630b847 (diff) | |
| download | HardenedPass-aaf6ceb8ecbc71f6948c84b1a19fb83abfe8a418.tar.gz HardenedPass-aaf6ceb8ecbc71f6948c84b1a19fb83abfe8a418.zip | |
all: reformat with ktfmt 0.36
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 | 44 |
1 files changed, 22 insertions, 22 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 291c654f..bd3141a8 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 @@ -200,18 +200,18 @@ class AutofillDecryptActivity : AppCompatActivity() { ) { OpenPgpApi.RESULT_CODE_SUCCESS -> { runCatching { - val entry = - withContext(Dispatchers.IO) { - @Suppress("BlockingMethodInNonBlockingContext") - passwordEntryFactory.create(decryptedOutput.toByteArray()) - } - AutofillPreferences.credentialsFromStoreEntry( - this, - file, - entry, - directoryStructure - ) - } + val entry = + withContext(Dispatchers.IO) { + @Suppress("BlockingMethodInNonBlockingContext") + passwordEntryFactory.create(decryptedOutput.toByteArray()) + } + AutofillPreferences.credentialsFromStoreEntry( + this, + file, + entry, + directoryStructure + ) + } .getOrElse { e -> logcat(ERROR) { e.asLog("Failed to parse password entry") } return null @@ -221,17 +221,17 @@ class AutofillDecryptActivity : AppCompatActivity() { val pendingIntent: PendingIntent = result.getParcelableExtra(OpenPgpApi.RESULT_INTENT)!! runCatching { - val intentToResume = - withContext(Dispatchers.Main) { - suspendCoroutine<Intent> { cont -> - continueAfterUserInteraction = cont - decryptInteractionRequiredAction.launch( - IntentSenderRequest.Builder(pendingIntent.intentSender).build() - ) + val intentToResume = + withContext(Dispatchers.Main) { + suspendCoroutine<Intent> { cont -> + continueAfterUserInteraction = cont + decryptInteractionRequiredAction.launch( + IntentSenderRequest.Builder(pendingIntent.intentSender).build() + ) + } } - } - decryptCredential(file, intentToResume) - } + decryptCredential(file, intentToResume) + } .getOrElse { e -> logcat(ERROR) { e.asLog("OpenPgpApi ACTION_DECRYPT_VERIFY failed with user interaction") |
