File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed
Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -5807,33 +5807,26 @@ public void addFocusables(ArrayList<View> views, int direction) {
58075807 *
58085808 * @see #FOCUSABLES_ALL
58095809 * @see #FOCUSABLES_TOUCH_MODE
5810- * @see #FOCUSABLES_ACCESSIBILITY
58115810 */
58125811 public void addFocusables(ArrayList<View> views, int direction, int focusableMode) {
58135812 if (views == null) {
58145813 return;
58155814 }
5816- if ((focusableMode & FOCUSABLE_IN_TOUCH_MODE) == FOCUSABLE_IN_TOUCH_MODE) {
5817- if (isFocusable() && (!isInTouchMode() || isFocusableInTouchMode())) {
5818- views.add(this);
5819- return;
5820- }
5821- }
58225815 if ((focusableMode & FOCUSABLES_ACCESSIBILITY) == FOCUSABLES_ACCESSIBILITY) {
58235816 if (AccessibilityManager.getInstance(mContext).isEnabled()
58245817 && includeForAccessibility()) {
58255818 views.add(this);
58265819 return;
58275820 }
58285821 }
5829- if ((focusableMode & FOCUSABLES_ALL) == FOCUSABLES_ALL) {
5830- if (isFocusable()) {
5831- views.add(this);
5832- return;
5833- }
5834- } else {
5835- throw new IllegalArgumentException("Unknow focusable mode: " + focusableMode);
5822+ if (!isFocusable()) {
5823+ return;
5824+ }
5825+ if ((focusableMode & FOCUSABLES_TOUCH_MODE) == FOCUSABLES_TOUCH_MODE
5826+ && isInTouchMode() && !isFocusableInTouchMode()) {
5827+ return;
58365828 }
5829+ views.add(this);
58375830 }
58385831
58395832 /**
You can’t perform that action at this time.
0 commit comments