Merge "Respect add focusables flags" into nyc-dev
am: 4c6eeb67a2
* commit '4c6eeb67a232fdbca43513d8414e38a55c40d75e':
Respect add focusables flags
Change-Id: I8bb85f17fa0d85ae9d58aa026711e298c1b0f09a
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 4e7d1914..77884f6 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -8740,7 +8740,7 @@
* @param direction The direction of the focus
*/
public void addFocusables(ArrayList<View> views, @FocusDirection int direction) {
- addFocusables(views, direction, FOCUSABLES_TOUCH_MODE);
+ addFocusables(views, direction, isInTouchMode() ? FOCUSABLES_TOUCH_MODE : FOCUSABLES_ALL);
}
/**
@@ -8768,7 +8768,7 @@
return;
}
if ((focusableMode & FOCUSABLES_TOUCH_MODE) == FOCUSABLES_TOUCH_MODE
- && isInTouchMode() && !isFocusableInTouchMode()) {
+ && !isFocusableInTouchMode()) {
return;
}
views.add(this);