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

Commit a90e4512 authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

Calling the correct method when adding accessibility focusables.

1. Since we added explicit accessibility focusable attribute when
   adding focusables views that do so should call this method. Some
   views were not updated to do so.

bug:6581924

Change-Id: Id64c0b2d76e5269ebf3fbe17203e73b174bdb843
parent 01827ce9
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -6308,10 +6308,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
        }
    }
    /**
     * @hide
     */
    public boolean canTakeAccessibilityFocusFromHover() {
    private boolean canTakeAccessibilityFocusFromHover() {
        if (includeForAccessibility() && isActionableForAccessibility()) {
            return true;
        }
+2 −2
Original line number Diff line number Diff line
@@ -1334,12 +1334,12 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            switch(direction) {
                case ACCESSIBILITY_FOCUS_BACKWARD: {
                    View focusable = (getChildCount() > 0) ? getChildAt(getChildCount() - 1) : this;
                    if (focusable.canTakeAccessibilityFocusFromHover()) {
                    if (focusable.isAccessibilityFocusable()) {
                        views.add(focusable);
                    }
                } return;
                case ACCESSIBILITY_FOCUS_FORWARD: {
                    if (canTakeAccessibilityFocusFromHover()) {
                    if (isAccessibilityFocusable()) {
                        views.add(this);
                    }
                } return;
+1 −1
Original line number Diff line number Diff line
@@ -1421,7 +1421,7 @@ public class NumberPicker extends LinearLayout {
        // We do not want the real descendant to be considered focus search
        // since it is managed by the accessibility node provider.
        if ((focusableMode & FOCUSABLES_ACCESSIBILITY) == FOCUSABLES_ACCESSIBILITY) {
            if (canTakeAccessibilityFocusFromHover() || getAccessibilityNodeProvider() != null) {
            if (isAccessibilityFocusable()) {
                views.add(this);
                return;
            }