List of usage examples for android.view.accessibility AccessibilityWindowInfo isFocused
public boolean isFocused()
From source file:com.android.utils.WindowManager.java
private static int getFocusedWindowIndex(List<AccessibilityWindowInfo> windows, int focusType) { if (windows == null) { return WRONG_INDEX; }//from w ww .j av a2 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; }