diff options
author | Mohamed Zenadi <mohamed@zenadi.com> | 2017-01-06 22:39:11 +0100 |
---|---|---|
committer | Mohamed Zenadi <mohamed@zenadi.com> | 2017-01-06 22:39:51 +0100 |
commit | 9082519f2559940a08e543500f5afb8fbf0a90da (patch) | |
tree | b63da070e357076d583bbe7fec2722a990b1ce4e /app/src/main | |
parent | 43cb468dd4af0b522d91d782ce61461d9d6c9d31 (diff) |
check that package name is not null
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java | 5 | ||||
-rw-r--r-- | app/src/main/res/xml/preference.xml | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java index 8881ecda..2ea95d5e 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java @@ -250,8 +250,9 @@ public class AutofillService extends AccessibilityService { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { dismiss = !getWindows().contains(window); } else { - dismiss = !(event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED - && event.getPackageName().toString().contains("inputmethod")); + dismiss = !(event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED && + event.getPackageName() != null && + event.getPackageName().toString().contains("inputmethod")); } if (dismiss && dialog != null && dialog.isShowing()) { dialog.dismiss(); diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml index 09b026d1..d675d7d1 100644 --- a/app/src/main/res/xml/preference.xml +++ b/app/src/main/res/xml/preference.xml @@ -57,6 +57,11 @@ android:title="@string/pref_copy_title" /> <CheckBoxPreference android:defaultValue="true" + android:key="clear_after_copy" + android:summary="After an automatic copy or a manual copy of the password, the clipboard will be automatically cleared." + android:title="Automatically clear the clipboard after copy" /> + <CheckBoxPreference + android:defaultValue="true" android:key="filter_recursively" android:summary="@string/pref_recursive_filter_hint" android:title="@string/pref_recursive_filter" /> |