summaryrefslogtreecommitdiffstats
path: root/quickstep/src/com/android/quickstep/TaskThumbnailCache.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2019-05-13 15:15:04 -0700
committerWinson Chung <winsonc@google.com>2019-05-13 16:22:10 -0700
commitcb554473c742967f95a36c9be83f6ec7ef1ac247 (patch)
treeb0e41b1e3a0fa970d379dfec7eb8ab8d3ed08fb4 /quickstep/src/com/android/quickstep/TaskThumbnailCache.java
parent5d5db96bb8eaf5da646361cfd6bcaa7cc9b05e1f (diff)
downloadandroid_packages_apps_Trebuchet-cb554473c742967f95a36c9be83f6ec7ef1ac247.tar.gz
android_packages_apps_Trebuchet-cb554473c742967f95a36c9be83f6ec7ef1ac247.tar.bz2
android_packages_apps_Trebuchet-cb554473c742967f95a36c9be83f6ec7ef1ac247.zip
Preemptively clear the thumbnail cache as tasks are removed
- Also reset the task thumbnail as the task views are recycled Bug: 132309376 Change-Id: Ic2cc846e451b6b59ae76326930cb4b85627e95c4
Diffstat (limited to 'quickstep/src/com/android/quickstep/TaskThumbnailCache.java')
-rw-r--r--quickstep/src/com/android/quickstep/TaskThumbnailCache.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/quickstep/src/com/android/quickstep/TaskThumbnailCache.java b/quickstep/src/com/android/quickstep/TaskThumbnailCache.java
index d05196bc8..57c5a2783 100644
--- a/quickstep/src/com/android/quickstep/TaskThumbnailCache.java
+++ b/quickstep/src/com/android/quickstep/TaskThumbnailCache.java
@@ -187,6 +187,13 @@ public class TaskThumbnailCache {
}
/**
+ * Removes the cached thumbnail for the given task.
+ */
+ public void remove(Task.TaskKey key) {
+ mCache.remove(key);
+ }
+
+ /**
* @return The cache size.
*/
public int getCacheSize() {