[Launcher Memory Leak] Avoid leaking Folder/FolderIcon when removing FolderIcon from TaskbarView
Fix: 380868830 Flag: NONE - released code Test: Presubmit Change-Id: I57c179384df06015a7e95a173c399cfcda236e46
This commit is contained in:
@@ -359,6 +359,10 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
if (!(view.getTag() instanceof CollectionInfo)) {
|
||||
mActivityContext.getViewCache().recycleView(view.getSourceLayoutResId(), view);
|
||||
}
|
||||
if (view instanceof FolderIcon fi) {
|
||||
// We should clear FolderInfo's Folder and FolderIcon to avoid memory leak.
|
||||
fi.removeListeners();
|
||||
}
|
||||
view.setTag(null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user