Linking various settings that control icon cache to icon state

Also separating icon provider for recents from Launcher as it used a fixed size

Bug: 183641907
Test: Verified on device
Change-Id: I6ea3caa0066d1483bfb8a81f0e8aaa472c813afe
This commit is contained in:
Sunny Goyal
2021-05-03 19:59:51 -07:00
parent e41034034f
commit b47172bc4e
11 changed files with 146 additions and 194 deletions

View File

@@ -16,8 +16,6 @@
package com.android.launcher3.model.data;
import static com.android.launcher3.config.FeatureFlags.ENABLE_THEMED_ICONS;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -232,7 +230,7 @@ public abstract class ItemInfoWithIcon extends ItemInfo {
* Returns a FastBitmapDrawable with the icon and context theme applied
*/
public FastBitmapDrawable newIcon(Context context, boolean applyTheme) {
FastBitmapDrawable drawable = applyTheme && ENABLE_THEMED_ICONS.get()
FastBitmapDrawable drawable = applyTheme
? bitmap.newThemedIcon(context) : bitmap.newIcon(context);
drawable.setIsDisabled(isDisabled());
return drawable;