aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java12
1 files changed, 12 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 78902d8a..efeabc3e 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
@@ -147,6 +147,9 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB
case R.id.copy_password:
ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", ((TextView) findViewById(R.id.crypto_password_show)).getText());
clipboard.setPrimaryClip(clip);
+ showToast("Password copied to clipboard, you have "
+ + Integer.parseInt(settings.getString("general_show_time", "45"))
+ + " seconds to paste it somewhere.");
}
return super.onOptionsItemSelected(item);
}
@@ -387,10 +390,19 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB
break;
}
case OpenPgpApi.RESULT_CODE_ERROR: {
+ // TODO show what kind of error it is
+ /* For example:
+ * No suitable key found -> no key in OpenKeyChain
+ *
+ * Check in open-pgp-lib how their definitions and error code
+ */
showToast("ERROR");
OpenPgpError error = result.getParcelableExtra(OpenPgpApi.RESULT_ERROR);
handleError(error);
+
+ // close the dialog
+ bindingDialog.dismiss();
break;
}