diff options
author | Matthew Wong <wongma@protonmail.ch> | 2015-07-21 16:10:55 -0400 |
---|---|---|
committer | Matthew Wong <wongma@protonmail.ch> | 2015-07-21 16:15:36 -0400 |
commit | d95286660ad5e626c75f4bc9f70e51277be67273 (patch) | |
tree | 3cec2cac9885e7304a043cc73f719e272355ee7e | |
parent | 9ff126a3fbbf50679870e709d4118a86f3ac14c2 (diff) |
Add 'clear clipboard 20 times' preference
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 6 | ||||
-rw-r--r-- | app/src/main/res/values-cs/strings.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/xml/preference.xml | 7 |
4 files changed, 17 insertions, 0 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index ca5ab33d..b744c4a0 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -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(""); diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 9180500a..1252adcb 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -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> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f60e4b15..75d5bb51 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -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> diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml index 67217c9d..e4071c96 100644 --- a/app/src/main/res/xml/preference.xml +++ b/app/src/main/res/xml/preference.xml @@ -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>
\ No newline at end of file |