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