diff options
author | Matthew Wong <wongma@protonmail.ch> | 2015-12-26 02:19:12 -0500 |
---|---|---|
committer | Matthew Wong <wongma@protonmail.ch> | 2015-12-26 02:19:12 -0500 |
commit | 9684c6c8a15809d8526ac8d9c0738b7edb7972d2 (patch) | |
tree | 599802fe6d75bd5e1c5d2e70047bbc3d39fb9faa | |
parent | 406d6c04255bbd76915f6beb71a237f101737045 (diff) |
Delete unused gen. public key
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/UserPreference.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java index 6311a7ac..5fb710cf 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.java +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.java @@ -367,6 +367,11 @@ public class UserPreference extends AppCompatActivity { SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean("use_generated_key", false); editor.apply(); + + //delete the public key from generation + File file = new File(getFilesDir() + "/.ssh_key.pub"); + file.delete(); + setResult(RESULT_OK); finish(); } catch (IOException e) { |