Skip logic to find the dominant color when loading recent task icons

- Also move some allocations in ColorExtractor into thread locals to reduce
  allocations

Bug: 78777731
Change-Id: I8819106d476a9af02e864135a2f44b55fe9219cd
This commit is contained in:
Winson Chung committed 2018-08-14 10:30:33 -07:00
1 parent b6ecb17356
commit 7debc53f93
6 files changed
+58 -15

No files matched your search

@@ -94,7 +94,9 @@ public class RecentsModel extends TaskStackChangeListener {
protected IconLoader createNewIconLoader(Context context,
TaskKeyLruCache<Drawable> iconCache,
LruCache<ComponentName, ActivityInfo> activityInfoCache) {
return new NormalizedIconLoader(context, iconCache, activityInfoCache);
// Disable finding the dominant color since we don't need to use it
return new NormalizedIconLoader(context, iconCache, activityInfoCache,
true /* disableColorExtraction */);
}
};
mRecentsTaskLoader.startLoader(mContext);