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

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

Merge "Fix finding views by accessibility id." into mnc-dev

parents 4a7bb462 6cc4627d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -18290,7 +18290,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (accessibilityId < 0) {
            return null;
        }
        return findViewByAccessibilityIdTraversal(accessibilityId);
        View view = findViewByAccessibilityIdTraversal(accessibilityId);
        if (view != null) {
            return view.includeForAccessibility() ? view : null;
        }
        return null;
    }
    /**
+6 −0
Original line number Diff line number Diff line
@@ -1173,6 +1173,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        if (foundView != null) {
            return foundView;
        }

        if (getAccessibilityNodeProvider() != null) {
            return null;
        }

        final int childrenCount = mChildrenCount;
        final View[] children = mChildren;
        for (int i = 0; i < childrenCount; i++) {
@@ -1182,6 +1187,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                return foundView;
            }
        }

        return null;
    }