From 9684c6c8a15809d8526ac8d9c0738b7edb7972d2 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Sat, 26 Dec 2015 02:19:12 -0500 Subject: Delete unused gen. public key --- app/src/main/java/com/zeapo/pwdstore/UserPreference.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') 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) { -- cgit v1.2.3