Add 'clear clipboard 20 times' preference

This commit is contained in:
Matthew Wong
2015-07-21 16:10:55 -04:00
parent 9ff126a3fb
commit d95286660a
4 changed files with 17 additions and 0 deletions

View File

@@ -256,6 +256,12 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
protected void onPostExecute(Boolean b) {
ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", "MyPasswordIsDaBest!");
clipboard.setPrimaryClip(clip);
if (settings.getBoolean("clear_clipboard_20x", false)) {
for (int i = 0; i < 19; i++) {
clip = ClipData.newPlainText(String.valueOf(i), String.valueOf(i));
clipboard.setPrimaryClip(clip);
}
}
if (showPassword) {
//clear password
((TextView) findViewById(R.id.crypto_password_show)).setText("");

View File

@@ -116,6 +116,8 @@
<string name="ssh_key_error_dialog_text">Zpráva : \n</string>
<string name="pref_recursive_filter">Rekurzivní filtrování</string>
<string name="pref_recursive_filter_hint">Rekurzivní hledání hesel v aktuálním adresáři.</string>
<string name="pref_clear_clipboard_hint">Store nonsense in the clipboard 20 times instead of just once. Useful on Samsung phones that feature clipboard history.</string>
<string name="pref_clear_clipboard">Clear clipboard 20 times</string>
<!-- pwgen fragment -->
<string name="pwgen_generate">Generate</string>

View File

@@ -117,6 +117,8 @@
<string name="ssh_key_error_dialog_text">Message : \n</string>
<string name="pref_recursive_filter">Recursive filtering</string>
<string name="pref_recursive_filter_hint">Recursively find passwords of the current directory.</string>
<string name="pref_clear_clipboard_hint">Store nonsense in the clipboard 20 times instead of just once. Useful on Samsung phones that feature clipboard history.</string>
<string name="pref_clear_clipboard">Clear clipboard 20 times</string>
<!-- pwgen fragment -->
<string name="pwgen_generate">Generate</string>

View File

@@ -70,4 +70,11 @@
android:summary="@string/pref_recursive_filter_hint"
android:title="@string/pref_recursive_filter" />
</PreferenceCategory>
<PreferenceCategory android:title="Misc">
<CheckBoxPreference
android:defaultValue="false"
android:key="clear_clipboard_20x"
android:summary="@string/pref_clear_clipboard_hint"
android:title="@string/pref_clear_clipboard" />
</PreferenceCategory>
</PreferenceScreen>