Clear ref to animation after drag & drop animation completes
- LauncherAppTransitionManagerImpl -> DragLayer -> mDropAnim -> mDragView
(via the update listener) -> mBitmap
Bug: 76162466
Test: Take hprof after picking up an app or widget, ensure there are no
references to the image created for drag and drop
Change-Id: Iffc92eed13775921567f9ac25fea8e356d6fe963
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java
index 3a1837d..7fef904 100644
--- a/src/com/android/launcher3/dragndrop/DragLayer.java
+++ b/src/com/android/launcher3/dragndrop/DragLayer.java
@@ -1,3 +1,4 @@
+
/*
* Copyright (C) 2008 The Android Open Source Project
*
@@ -479,6 +480,7 @@
case ANIMATION_END_REMAIN_VISIBLE:
break;
}
+ mDropAnim = null;
}
});
mDropAnim.start();
@@ -488,6 +490,7 @@
if (mDropAnim != null) {
mDropAnim.cancel();
}
+ mDropAnim = null;
if (mDropView != null) {
mDragController.onDeferredEndDrag(mDropView);
}