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

Commit 5bfddc3f authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

Merge "Fix View leakage from mPreSortedChildren" into nyc-dev am: 4e34cd05

am: 1318ac2c

* commit '1318ac2c':
  Fix View leakage from mPreSortedChildren

Change-Id: I7a4b73b46c50447e32e80111bfa7aff9e94421ac
parents ee8478e0 1318ac2c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1718,11 +1718,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                if (isTransformedTouchPointInView(x, y, child, point)) {
                    final PointerIcon pointerIcon = child.getPointerIcon(event, point.x, point.y);
                    if (pointerIcon != null) {
                        if (preorderedList != null) preorderedList.clear();
                        return pointerIcon;
                    }
                    break;
                }
            }
            if (preorderedList != null) preorderedList.clear();
        }

        // The pointer is not a child or the child has no preferences, returning the default
@@ -3028,6 +3030,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                        final ViewStructure cstructure = structure.newChild(i);
                        child.dispatchProvideStructure(cstructure);
                    }
                    if (preorderedList != null) preorderedList.clear();
                }
            }
        }
@@ -3619,6 +3622,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        if (mPreSortedChildren == null) {
            mPreSortedChildren = new ArrayList<>(childrenCount);
        } else {
            // callers should clear, so clear shouldn't be necessary, but for safety...
            mPreSortedChildren.clear();
            mPreSortedChildren.ensureCapacity(childrenCount);
        }