From 0c0054b5656afdf67ba9250669d9a38dae8b24dc Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Tue, 28 Jul 2015 11:52:59 -0400 Subject: Dialog dismissal behaviour. (com.android.inputmethod, the keyboard, is a TYPE_WINDOW_STATE_CHANGED, so needs an exception) --- app/src/main/java/com/zeapo/pwdstore/AutofillService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/src/main/java/com/zeapo/pwdstore/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/AutofillService.java index 5093dac3..a490fe17 100644 --- a/app/src/main/java/com/zeapo/pwdstore/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/AutofillService.java @@ -68,12 +68,14 @@ public class AutofillService extends AccessibilityService { if (!event.isPassword() || Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 || event.getPackageName().equals("org.sufficientlysecure.keychain")) { - if (dialog != null && dialog.isShowing()) { + if (!(event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED + && event.getPackageName().toString().contains("com.android.inputmethod")) + && dialog != null && dialog.isShowing()) { dialog.dismiss(); } return; } - if (!event.getSource().equals(info) && dialog != null && dialog.isShowing()) { + if (dialog != null && dialog.isShowing()) { dialog.dismiss(); } if (ignoreActionFocus) { -- cgit v1.2.3