diff options
author | Mohamed Zenadi <mohamed@zenadi.com> | 2017-07-25 18:19:06 +0100 |
---|---|---|
committer | Mohamed Zenadi <mohamed@zenadi.com> | 2017-07-25 18:19:06 +0100 |
commit | 7e7a98e80a80a9eee80538e09572766592a48f53 (patch) | |
tree | 23cf846e4fa9b2674231e09cc90df36547b66b79 | |
parent | 3df08059768e3885d57dd7c398edf98fff594fd7 (diff) |
check that the data we get from OpenKeychain is not null
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 4 |
1 files changed, 4 insertions, 0 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 13e8704b..05b87b98 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -394,6 +394,10 @@ 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(); + } // try again after user interaction if (resultCode == RESULT_OK) { |