Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21d12516 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Fixing broken add focusables behavior I have introduced."

parents 21610283 3cb889ca
Loading
Loading
Loading
Loading
+7 −14
Original line number Diff line number Diff line
@@ -5814,18 +5814,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
     *
     * @see #FOCUSABLES_ALL
     * @see #FOCUSABLES_TOUCH_MODE
     * @see #FOCUSABLES_ACCESSIBILITY
     */
    public void addFocusables(ArrayList<View> views, int direction, int focusableMode) {
        if (views == null) {
            return;
        }
        if ((focusableMode & FOCUSABLE_IN_TOUCH_MODE) == FOCUSABLE_IN_TOUCH_MODE) {
            if (isFocusable() && (!isInTouchMode() || isFocusableInTouchMode())) {
                views.add(this);
                return;
            }
        }
        if ((focusableMode & FOCUSABLES_ACCESSIBILITY) == FOCUSABLES_ACCESSIBILITY) {
            if (AccessibilityManager.getInstance(mContext).isEnabled()
                    && includeForAccessibility()) {
@@ -5833,14 +5826,14 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
                return;
            }
        }
        if ((focusableMode & FOCUSABLES_ALL) == FOCUSABLES_ALL) {
            if (isFocusable()) {
                views.add(this);
        if (!isFocusable()) {
            return;
        }
        } else {
            throw new IllegalArgumentException("Unknow focusable mode: " + focusableMode);
        if ((focusableMode & FOCUSABLES_TOUCH_MODE) == FOCUSABLES_TOUCH_MODE
                && isInTouchMode() && !isFocusableInTouchMode()) {
            return;
        }
        views.add(this);
    }
    /**