mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-01 06:45:19 +00:00
Dismiss dialog if non password field or window change (the accessibility events already needed to be handled)
This commit is contained in:
@@ -43,8 +43,8 @@ public class AutofillService extends AccessibilityService {
|
|||||||
private ArrayList<PasswordItem> items; // password choices
|
private ArrayList<PasswordItem> items; // password choices
|
||||||
private AlertDialog dialog;
|
private AlertDialog dialog;
|
||||||
private static boolean unlockOK = false; // if openkeychain user interaction was successful
|
private static boolean unlockOK = false; // if openkeychain user interaction was successful
|
||||||
private static CharSequence packageName;
|
private CharSequence packageName;
|
||||||
private static boolean ignoreActionFocus = false;
|
private boolean ignoreActionFocus = false;
|
||||||
|
|
||||||
public final class Constants {
|
public final class Constants {
|
||||||
public static final String TAG = "Keychain";
|
public static final String TAG = "Keychain";
|
||||||
@@ -68,10 +68,15 @@ public class AutofillService extends AccessibilityService {
|
|||||||
}
|
}
|
||||||
if (!event.isPassword()
|
if (!event.isPassword()
|
||||||
|| Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2
|
|| Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2
|
||||||
|| (dialog != null && dialog.isShowing())
|
|
||||||
|| event.getPackageName().equals("org.sufficientlysecure.keychain")) {
|
|| event.getPackageName().equals("org.sufficientlysecure.keychain")) {
|
||||||
|
if (dialog != null && dialog.isShowing()) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!event.getSource().equals(info) && dialog != null && dialog.isShowing()) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
if (ignoreActionFocus) {
|
if (ignoreActionFocus) {
|
||||||
ignoreActionFocus = false;
|
ignoreActionFocus = false;
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user