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

Commit b61c00e2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix pointer icon handling for invisible and overlapping views"

parents 9f22e1ba 3d5cfc04
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1788,16 +1788,16 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            for (int i = childrenCount - 1; i >= 0; i--) {
                final int childIndex = getAndVerifyPreorderedIndex(childrenCount, i, customOrder);
                final View child = getAndVerifyPreorderedView(preorderedList, children, childIndex);
                final PointF point = getLocalPoint();
                if (isTransformedTouchPointInView(x, y, child, point)) {
                if (!canViewReceivePointerEvents(child)
                        || !isTransformedTouchPointInView(x, y, child, null)) {
                    continue;
                }
                final PointerIcon pointerIcon =
                        dispatchResolvePointerIcon(event, pointerIndex, child);
                if (pointerIcon != null) {
                    if (preorderedList != null) preorderedList.clear();
                    return pointerIcon;
                }
                    break;
                }
            }
            if (preorderedList != null) preorderedList.clear();
        }