1 package com.android.launcher3; 2 3 import static com.android.launcher3.util.MainThreadInitializedObject.forOverride; 4 5 import android.content.pm.LauncherActivityInfo; 6 import android.graphics.drawable.Drawable; 7 8 import com.android.launcher3.util.MainThreadInitializedObject; 9 import com.android.launcher3.util.ResourceBasedOverride; 10 11 public class IconProvider implements ResourceBasedOverride { 12 13 public static MainThreadInitializedObject<IconProvider> INSTANCE = 14 forOverride(IconProvider.class, R.string.icon_provider_class); 15 IconProvider()16 public IconProvider() { } 17 getSystemStateForPackage(String systemState, String packageName)18 public String getSystemStateForPackage(String systemState, String packageName) { 19 return systemState; 20 } 21 22 /** 23 * @param flattenDrawable true if the caller does not care about the specification of the 24 * original icon as long as the flattened version looks the same. 25 */ getIcon(LauncherActivityInfo info, int iconDpi, boolean flattenDrawable)26 public Drawable getIcon(LauncherActivityInfo info, int iconDpi, boolean flattenDrawable) { 27 return info.getIcon(iconDpi); 28 } 29 } 30