From ba3cf0162da2d7dc732c735c89949cc98faf120b Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Mon, 7 Mar 2016 20:04:51 -0500 Subject: fix #172 firefox autofill crash --- app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java') 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 526d6f98..145843fc 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java @@ -105,7 +105,7 @@ public class AutofillService extends AccessibilityService { // or if page changes in chrome if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED || (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED - && event.getSource() != null + && event.getSource() != null && event.getSource().getPackageName() != null && (event.getSource().getPackageName().equals("com.android.chrome") || event.getSource().getPackageName().equals("com.android.browser")))) { // there is a chance for getRootInActiveWindow() to return null at any time. save it. -- cgit v1.2.3