summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2019-06-25 14:44:05 -0700
committerWinson Chung <winsonc@google.com>2019-06-25 14:44:05 -0700
commitdf9fc63e8c0dd75af1bd1d50d090f9821fd62fc6 (patch)
treef1fc7a606f71e1b38b9468a625c30ea2b55dc1ee /quickstep/recents_ui_overrides
parenta90531cd00ad64fb8501c8190f99e068f9d581d6 (diff)
downloadandroid_packages_apps_Trebuchet-df9fc63e8c0dd75af1bd1d50d090f9821fd62fc6.tar.gz
android_packages_apps_Trebuchet-df9fc63e8c0dd75af1bd1d50d090f9821fd62fc6.tar.bz2
android_packages_apps_Trebuchet-df9fc63e8c0dd75af1bd1d50d090f9821fd62fc6.zip
Clean up some more refs to thumbnail data
- Always return a copy of the task list to ensure that the model doesn't hold refs to the thumbnail data if it was loaded into the same task - Always clear the task thumbnail data ref once the visibility of the task view changes to be invisible Bug: 132309376 Test: Enter overview scroll to the end of the list, relaunch app and take heap dump Change-Id: I4437fd30172a5fe2a78c111f780163a1e6bbbb54
Diffstat (limited to 'quickstep/recents_ui_overrides')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
index e7e41893c..b26fdce92 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
@@ -368,6 +368,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
} else {
mSnapshotView.setThumbnail(null, null);
setIcon(null);
+ // Reset the task thumbnail reference as well (it will be fetched from the cache or
+ // reloaded next time we need it)
+ mTask.thumbnail = null;
}
}
@@ -488,9 +491,6 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
mSnapshotView.setThumbnail(mTask, null);
setOverlayEnabled(false);
onTaskListVisibilityChanged(false);
- if (mTask != null) {
- mTask.thumbnail = null;
- }
}
@Override