aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/com/zeapo
diff options
context:
space:
mode:
authorMatthew Wong <wongma@protonmail.ch>2015-07-28 09:59:28 -0400
committerMatthew Wong <wongma@protonmail.ch>2015-08-14 17:36:45 -0400
commit690155391ce169f2c9b48558732a12e5d0e91c36 (patch)
treeaac2ea422def0f8b9327e37ef0f7acd7fb3580ea /app/src/main/java/com/zeapo
parent8c266187cb1a1264034fe2637d3b22e67284b0b5 (diff)
Dismiss dialog if non password field or window change (the accessibility events already needed to be handled)
Diffstat (limited to 'app/src/main/java/com/zeapo')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/AutofillService.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/AutofillService.java
index 58bb0994..1636702a 100644
--- a/app/src/main/java/com/zeapo/pwdstore/AutofillService.java
+++ b/app/src/main/java/com/zeapo/pwdstore/AutofillService.java
@@ -43,8 +43,8 @@ public class AutofillService extends AccessibilityService {
private ArrayList<PasswordItem> items; // password choices
private AlertDialog dialog;
private static boolean unlockOK = false; // if openkeychain user interaction was successful
- private static CharSequence packageName;
- private static boolean ignoreActionFocus = false;
+ private CharSequence packageName;
+ private boolean ignoreActionFocus = false;
public final class Constants {
public static final String TAG = "Keychain";
@@ -68,10 +68,15 @@ public class AutofillService extends AccessibilityService {
}
if (!event.isPassword()
|| Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2
- || (dialog != null && dialog.isShowing())
|| event.getPackageName().equals("org.sufficientlysecure.keychain")) {
+ if (dialog != null && dialog.isShowing()) {
+ dialog.dismiss();
+ }
return;
}
+ if (!event.getSource().equals(info) && dialog != null && dialog.isShowing()) {
+ dialog.dismiss();
+ }
if (ignoreActionFocus) {
ignoreActionFocus = false;
return;