summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorMatthew Wong <wongma7@outlook.com>2015-08-26 03:49:36 -0400
committerMatthew Wong <wongma7@outlook.com>2015-08-26 03:49:36 -0400
commitc54d28af8a0366b195019e153b276e5d570684ec (patch)
tree8658378beffaf343c5f72493a6226f282ee0bb36 /app/src/main/java
parent540349542bac3bcce15a0d9fed74caff76807130 (diff)
Disallow name change when editing password
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java6
1 files changed, 5 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 67311774..d7664780 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
@@ -160,16 +160,20 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
((EditText) findViewById(R.id.crypto_extra_edit)).setTypeface(monoTypeface);
((TextView) findViewById(R.id.crypto_password_category)).setText(category);
- ((TextView) findViewById(R.id.crypto_password_file_edit)).setText(file);
+ ((EditText) findViewById(R.id.crypto_password_file_edit)).setText(file);
((EditText) findViewById(R.id.crypto_password_edit)).setText(password);
((EditText) findViewById(R.id.crypto_extra_edit)).setText(extra);
+ // strictly editing only i.e. can't save this password's info to another file by changing name
+ findViewById(R.id.crypto_password_file_edit).setEnabled(false);
+
// the original intent was to decrypt so FILE_PATH will have the file, not enclosing dir
// PgpCallback expects the dir when encrypting
String filePath = getIntent().getExtras().getString("FILE_PATH");
String directoryPath = filePath.substring(0, filePath.lastIndexOf(File.separator));
Intent intent = new Intent(this, PgpHandler.class);
intent.putExtra("FILE_PATH", directoryPath);
+ intent.putExtra("Operation", "ENCRYPT");
setIntent(intent);
}