Reset SSH passphrase after SSH key import (#885)

(cherry picked from commit 6b5984dfe6)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Fabian Henneke 2020-06-26 09:00:19 +02:00 committed by Harsh Shandilya
parent 694e461f6c
commit b5cff71b93
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -655,6 +655,7 @@ class UserPreference : AppCompatActivity() {
val prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext) val prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext)
prefs.edit { putBoolean("use_generated_key", false) } prefs.edit { putBoolean("use_generated_key", false) }
getEncryptedPrefs("git_operation").edit { remove("ssh_key_local_passphrase") }
// Delete the public key from generation // Delete the public key from generation
File("""$filesDir/.ssh_key.pub""").delete() File("""$filesDir/.ssh_key.pub""").delete()