diff options
author | DSIW <dsiw@dsiw-it.de> | 2016-06-10 06:30:25 +0200 |
---|---|---|
committer | DSIW <dsiw@dsiw-it.de> | 2016-06-10 06:30:25 +0200 |
commit | d1c15a43d50f8df719a87251e7bb91c8f0acceb2 (patch) | |
tree | b9e5ce28c7ac1974296029e2fb16d7fa3a302d5d /app/src/main/java | |
parent | da1e95241db7c4377058c1abff9115ca3557c81a (diff) |
Restyle new password formular
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 23 |
1 files changed, 16 insertions, 7 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 a80e4800..f984ad31 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -81,6 +81,10 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne this.activity = this; this.clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); + if (getIntent().getStringExtra("Operation").equals("ENCRYPT")) { + setTitle("New password"); + } + // some persistance settings = PreferenceManager.getDefaultSharedPreferences(this); String providerPackageName = settings.getString("openpgp_provider_list", ""); @@ -121,7 +125,11 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.pgp_handler, menu); + if (getIntent().getStringExtra("Operation").equals("ENCRYPT")) { + getMenuInflater().inflate(R.menu.pgp_handler_new_password, menu); + } else { + getMenuInflater().inflate(R.menu.pgp_handler, menu); + } return true; } @@ -141,6 +149,13 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne break; case R.id.edit_password: editPassword(); + case R.id.crypto_confirm_add: + encrypt(new Intent()); + break; + case R.id.crypto_cancel_add: + setResult(RESULT_CANCELED); + finish(); + return true; } return super.onOptionsItemSelected(item); } @@ -205,12 +220,6 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne case R.id.crypto_show_button: decryptAndVerify(new Intent()); break; - case R.id.crypto_confirm_add: - encrypt(new Intent()); - break; - case R.id.crypto_cancel_add: - finish(); - break; case R.id.crypto_delete_button: // deletePassword(); break; |