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

Commit 73590c77 authored by lucychang's avatar lucychang Committed by Lucy Chang
Browse files

Clear data after calling ViewGroup#buildOrderedChildList

It needs to clear the reference views after calling
ViewGroup#buildOrderedChildList to prevent memory leak.

Bug: 178029590
Test: manually test
Change-Id: I770c8deab00496f9361ab30837a31f44c7367a46
parent d9b723b8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10364,6 +10364,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                        for (int i = 0; i < childDrawIndex; i++) {
                            drawingOrderInParent += numViewsForAccessibility(preorderedList.get(i));
                        }
                        preorderedList.clear();
                    } else {
                        final int childIndex = parentGroup.indexOfChild(viewAtDrawingLevel);
                        final boolean customOrder = parentGroup.isChildrenDrawingOrderEnabled();