Add option to automatically copy password to clipboard after decryption

This commit is contained in:
Johannes Baiter
2014-10-29 11:22:16 +01:00
parent 9822c097cb
commit 7d4b6683ef
2 changed files with 7 additions and 1 deletions

View File

@@ -338,7 +338,9 @@ public class PgpHandler extends ActionBarActivity implements OpenPgpServiceConne
.setText(extraContent);
}
new DelayShow().execute();
copyToClipBoard();
if (settings.getBoolean("copy_on_decrypt", true)) {
copyToClipBoard();
}
} else {
showToast(os.toString());
}

View File

@@ -30,5 +30,9 @@
android:dialogTitle="Set the time you want the password to be in clipboard"
android:summary="Set the time you want the password to be in clipboard"
android:hint="45" android:key="general_show_time" />
<CheckBoxPreference android:title="Automatically Copy Password"
android:dialogTitle="Automatically copy the password to the clipboard after decryption was successful."
android:summary="Automatically copy the password to the clipboard after decryption was successful."
android:key="copy_on_decrypt" android:defaultValue="true" />
</PreferenceCategory>
</PreferenceScreen>