Revert "Revert "Use color extraction for arrow popup.""
This reverts commit 17fda29bf3.
Reason for revert: Fixing the memory leak
Leak was detected in caused launcher tapl tests to fail.
For instructions on how to debug leaks, see go/launcher-testing.
Using AS memory profiler, the color extractor class is holding
onto a reference to launcher that has already been destroyed.
The fix is to set the listener to null when view is closed.
Bug: 175329686
Test: run profiler in AS, open and close popups, and verify no leaks
Change-Id: I2d4a87f0481cbc88f3587dce91278e85ca113545
This commit is contained in:
1 parent
30ffc3f95c
commit
21930da9a2
8 files changed
+296
-85
No files matched your search
@@ -233,15 +233,8 @@ public class FloatingIconView extends FrameLayout implements
|
||||
outViewBounds.set(0, 0, v.getWidth(), v.getHeight());
|
||||
}
|
||||
|
||||
float[] points = new float[] {outViewBounds.left, outViewBounds.top, outViewBounds.right,
|
||||
outViewBounds.bottom};
|
||||
Utilities.getDescendantCoordRelativeToAncestor(v, launcher.getDragLayer(), points,
|
||||
false, ignoreTransform);
|
||||
outRect.set(
|
||||
Math.min(points[0], points[2]),
|
||||
Math.min(points[1], points[3]),
|
||||
Math.max(points[0], points[2]),
|
||||
Math.max(points[1], points[3]));
|
||||
Utilities.getBoundsForViewInDragLayer(launcher.getDragLayer(), v, outViewBounds,
|
||||
ignoreTransform, outRect);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user