diff options
author | Mohamed Zenadi <mohamed@zenadi.com> | 2017-07-25 18:24:47 +0100 |
---|---|---|
committer | Mohamed Zenadi <mohamed@zenadi.com> | 2017-07-25 18:24:47 +0100 |
commit | 5119ae1b8ef8e738c1f54edbe01c5ff219671caf (patch) | |
tree | d5c50a5b41e50aa80858f7fb8ce331484179ec89 /app/src/main | |
parent | 7e7a98e80a80a9eee80538e09572766592a48f53 (diff) |
remove the most probably the buggiest calls ever
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index 05b87b98..32a3ced6 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -394,9 +394,11 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); Log.d(Constants.TAG, "onActivityResult resultCode: " + resultCode); + if (data == null) { setResult(RESULT_CANCELED, null); finish(); + return; } // try again after user interaction @@ -408,14 +410,6 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne * interaction, for example selected key ids. */ switch (requestCode) { - case REQUEST_CODE_ENCRYPT: { - encrypt(data); - break; - } - case REQUEST_CODE_DECRYPT_AND_VERIFY: { - decryptAndVerify(data); - break; - } case REQUEST_CODE_GET_KEY_IDS: getKeyIds(data); break; @@ -423,6 +417,9 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne edit(data); break; } + default: + setResult(RESULT_OK); + finish(); } } else if (resultCode == RESULT_CANCELED) { setResult(RESULT_CANCELED, data); |