Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 9082519

Browse files
committed
check that package name is not null
1 parent 43cb468 commit 9082519

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@ private void dismissDialog(AccessibilityEvent event) {
250250
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
251251
dismiss = !getWindows().contains(window);
252252
} else {
253-
dismiss = !(event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED
254-
&& event.getPackageName().toString().contains("inputmethod"));
253+
dismiss = !(event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED &&
254+
event.getPackageName() != null &&
255+
event.getPackageName().toString().contains("inputmethod"));
255256
}
256257
if (dismiss && dialog != null && dialog.isShowing()) {
257258
dialog.dismiss();

app/src/main/res/xml/preference.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
android:key="copy_on_decrypt"
5656
android:summary="@string/pref_copy_dialog_title"
5757
android:title="@string/pref_copy_title" />
58+
<CheckBoxPreference
59+
android:defaultValue="true"
60+
android:key="clear_after_copy"
61+
android:summary="After an automatic copy or a manual copy of the password, the clipboard will be automatically cleared."
62+
android:title="Automatically clear the clipboard after copy" />
5863
<CheckBoxPreference
5964
android:defaultValue="true"
6065
android:key="filter_recursively"

0 commit comments

Comments
 (0)