check that package name is not null

This commit is contained in:
Mohamed Zenadi 2017-01-06 22:39:11 +01:00
parent 43cb468dd4
commit 9082519f25
2 changed files with 8 additions and 2 deletions

View file

@ -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();

View file

@ -55,6 +55,11 @@
android:key="copy_on_decrypt"
android:summary="@string/pref_copy_dialog_title"
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"