diff options
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 12 | ||||
-rw-r--r-- | app/src/main/res/layout/decrypt_layout.xml | 2 |
2 files changed, 13 insertions, 1 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; } diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml index 300e1d49..6169dd19 100644 --- a/app/src/main/res/layout/decrypt_layout.xml +++ b/app/src/main/res/layout/decrypt_layout.xml @@ -77,7 +77,7 @@ <ProgressBar android:id="@+id/pbLoading" android:layout_width="match_parent" - android:layout_height="2dp" + android:layout_height="8dp" android:layout_marginTop="8dp" android:layout_marginBottom="8dp" style="?android:attr/progressBarStyleHorizontal" |