aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-07-16 12:18:38 +0530
committerGitHub <noreply@github.com>2020-07-16 12:18:38 +0530
commitd4379a47791ea0002eda9821f35c632f1e224962 (patch)
tree2800d02bc7c2e412777cd4d7e00105b575f5d375 /app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt
parent41ecdd7b08bf3119c365ed8ce29fb95c63668e4b (diff)
downloadHardenedPass-d4379a47791ea0002eda9821f35c632f1e224962.tar.gz
HardenedPass-d4379a47791ea0002eda9821f35c632f1e224962.zip
Remove manual key selection and start actually using `.gpg-id` (#916)
Co-authored-by: Aditya Wasan <adityawasan55@gmail.com> Co-authored-by: Fabian Henneke <fabian@henneke.me>
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt
index 3425a346..cc70dcc1 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/DecryptActivity.kt
@@ -13,7 +13,6 @@ import android.view.Menu
import android.view.MenuItem
import android.view.View
import androidx.activity.result.IntentSenderRequest
-import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult
import androidx.activity.result.contract.ActivityResultContracts.StartIntentSenderForResult
import androidx.lifecycle.lifecycleScope
import com.github.ajalt.timberkt.e
@@ -57,13 +56,9 @@ class DecryptActivity : BasePgpActivity(), OpenPgpServiceConnection.OnBound {
}
}
- private val openKeychainResult = registerForActivityResult(StartActivityForResult()) {
- decryptAndVerify()
- }
-
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- bindToOpenKeychain(this, openKeychainResult)
+ bindToOpenKeychain(this)
title = name
with(binding) {
setContentView(root)
@@ -134,7 +129,7 @@ class DecryptActivity : BasePgpActivity(), OpenPgpServiceConnection.OnBound {
@OptIn(ExperimentalTime::class)
private fun decryptAndVerify(receivedIntent: Intent? = null) {
if (api == null) {
- bindToOpenKeychain(this, openKeychainResult)
+ bindToOpenKeychain(this)
return
}
val data = receivedIntent ?: Intent()