From c2fb1a3ee2f4fa4721186df012f4a381d40f96af Mon Sep 17 00:00:00 2001 From: zeapo Date: Sun, 17 Aug 2014 13:38:21 +0200 Subject: corrected a bug where binding dialog was not dismissed --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app') 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 423b513d..26d49db9 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -263,7 +263,6 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB @Override public void onReturn(Intent result) { - bindingDialog.dismiss(); switch (result.getIntExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR)) { case OpenPgpApi.RESULT_CODE_SUCCESS: { @@ -275,6 +274,8 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB Log.d(OpenPgpApi.TAG, "result: " + os.toByteArray().length + " str=" + os.toString("UTF-8")); + bindingDialog.dismiss(); + if (returnToCiphertextField) { findViewById(R.id.crypto_container).setVisibility(View.VISIBLE); @@ -463,12 +464,16 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB ((TextView) findViewById(R.id.crypto_password_category)).setText(cat + "/"); decryptAndVerify(new Intent()); } else if (extra.getString("Operation").equals("ENCRYPT")) { + bindingDialog.dismiss(); + setContentView(R.layout.encrypt_layout); String cat = extra.getString("FILE_PATH"); cat = cat.replace(PasswordRepository.getWorkTree().getAbsolutePath(), ""); cat = cat + "/"; ((TextView) findViewById(R.id.crypto_password_category)).setText(cat); } else if (extra.getString("Operation").equals("GET_KEY_ID")) { + bindingDialog.dismiss(); + setContentView(R.layout.key_id); if (!keyIDs.isEmpty()) { String keys = keyIDs.split(",").length > 1 ? keyIDs : keyIDs.split(",")[0]; -- cgit v1.2.3