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

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

Merge "Respect custom view drawing order when dispatching hover events." into jb-mr2-dev

parents 8692685a 0e5e9aa8
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1464,10 +1464,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            final float y = event.getY();
            final float y = event.getY();
            final int childrenCount = mChildrenCount;
            final int childrenCount = mChildrenCount;
            if (childrenCount != 0) {
            if (childrenCount != 0) {
                final boolean customChildOrder = isChildrenDrawingOrderEnabled();
                final View[] children = mChildren;
                final View[] children = mChildren;
                HoverTarget lastHoverTarget = null;
                HoverTarget lastHoverTarget = null;
                for (int i = childrenCount - 1; i >= 0; i--) {
                for (int i = childrenCount - 1; i >= 0; i--) {
                    final View child = children[i];
                    final int childIndex = customChildOrder
                            ? getChildDrawingOrder(childrenCount, i) : i;
                    final View child = children[childIndex];
                    if (!canViewReceivePointerEvents(child)
                    if (!canViewReceivePointerEvents(child)
                            || !isTransformedTouchPointInView(x, y, child, null)) {
                            || !isTransformedTouchPointInView(x, y, child, null)) {
                        continue;
                        continue;