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

Commit 6adf3a18 authored by Phil Weaver's avatar Phil Weaver
Browse files

Stop leaking view during a11y sorting

I added a reference to a view in a pooled object,
but did not clear the reference to it when releasing it.
Thus the links to the View (and its Context) live as long
at the static object.

This code is only called when accessibility is on.

Bug: 112792715
Test: make
Change-Id: If716c33b91aac3a1da5fd4a857daa5b4b9b7e151
parent 8f80b51b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8621,7 +8621,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
         * Compare two views based on their bounds. Use the bounds of their children to break ties.
         *
         * @param holder1 Holder of first view to compare
         * @param holder2 Holder of second view to compare. Must have the same root at holder1.
         * @param holder2 Holder of second view to compare. Must have the same root as holder1.
         * @return The compare result, with equality if no good comparison was found.
         */
        private static int compareBoundsOfTree(
@@ -8714,6 +8714,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager

        private void clear() {
            mView = null;
            mRoot = null;
            mLocation.set(0, 0, 0, 0);
        }
    }