List of usage examples for android.view.accessibility AccessibilityWindowInfo isAccessibilityFocused
public boolean isAccessibilityFocused()
From source file:com.android.utils.WindowManager.java
private static int getFocusedWindowIndex(List<AccessibilityWindowInfo> windows, int focusType) { if (windows == null) { return WRONG_INDEX; }// w w w . ja va2 s .c o m for (int i = 0, size = windows.size(); i < size; i++) { AccessibilityWindowInfo window = windows.get(i); if (window == null) { continue; } if (focusType == AccessibilityNodeInfo.FOCUS_ACCESSIBILITY && window.isAccessibilityFocused()) { return i; } else if (focusType == AccessibilityNodeInfo.FOCUS_INPUT && window.isFocused()) { return i; } } return WRONG_INDEX; }