diff options
| author | Harsh Shandilya <msfjarvis@gmail.com> | 2019-10-27 00:14:42 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-27 00:14:42 +0530 |
| commit | cdf45bc323bd21eeb6252c9d9b70a990f7b39b75 (patch) | |
| tree | e23c97e6135b680fc83fa6d3a4905cb3a8f83f75 /app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt | |
| parent | 2fcec8685b7d198d8f3cd3a5d5960cb633394fe5 (diff) | |
| download | HardenedPass-cdf45bc323bd21eeb6252c9d9b70a990f7b39b75.tar.gz HardenedPass-cdf45bc323bd21eeb6252c9d9b70a990f7b39b75.zip | |
Add setting to save OpenKeychain auth keyid (#554)
* Add setting to save OpenKeychain auth keyid
* Hide pref not disable
Co-Authored-By: Reagan Sanders <vexofp@gmail.com>
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt index cf9c3442..53ed3461 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.kt @@ -613,7 +613,7 @@ open class GitActivity : AppCompatActivity() { } } - override fun onActivityResult( + public override fun onActivityResult( requestCode: Int, resultCode: Int, data: Intent? @@ -625,9 +625,17 @@ open class GitActivity : AppCompatActivity() { // background thread - the actual signing of the SSH challenge. We pass through the // completed signature to the ApiIdentity, which will be blocked in the other thread // waiting for it. - if (requestCode == SshApiSessionFactory.POST_SIGNATURE && identity != null) + if (requestCode == SshApiSessionFactory.POST_SIGNATURE && identity != null) { identity!!.postSignature(data) + // If the signature failed (usually because it was cancelled), reset state + if (data == null) { + identity = null + identityBuilder = null + } + return + } + if (resultCode == AppCompatActivity.RESULT_CANCELED) { setResult(AppCompatActivity.RESULT_CANCELED) finish() |
