Remove popup container drag listener on close complete.
The drag listener is never removed causing a memory leak over time.
Bug: 217162588
Test: Verified removal once drag is finished and close complete is
called.
Change-Id: Iff7bac8724e76e5dec98edaffe2d8853516f6c87
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index 198397a..05d6fc6 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -508,6 +508,7 @@
@Override
protected void closeComplete() {
super.closeComplete();
+ mActivityContext.getDragController().removeDragListener(this);
PopupContainerWithArrow openPopup = getOpen(mActivityContext);
if (openPopup == null || openPopup.mOriginalIcon != mOriginalIcon) {
mOriginalIcon.setTextVisibility(mOriginalIcon.shouldTextBeVisible());