Ignore focus only when it is from a successful performAction

This commit is contained in:
Matthew Wong
2015-07-28 12:05:26 -04:00
parent 0c0054b565
commit 7182db30b7

View File

@@ -162,8 +162,7 @@ public class AutofillService extends AccessibilityService {
String[] passContent = os.toString("UTF-8").split("\n"); String[] passContent = os.toString("UTF-8").split("\n");
// if the user focused on something else, take focus back // if the user focused on something else, take focus back
// but this will open another dialog...hack to ignore this // but this will open another dialog...hack to ignore this
ignoreActionFocus = true; ignoreActionFocus = info.performAction(AccessibilityNodeInfo.ACTION_FOCUS);
info.performAction(AccessibilityNodeInfo.ACTION_FOCUS);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putCharSequence(AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, args.putCharSequence(AccessibilityNodeInfo.ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE,