blob: 0f006f7c1930673f2bdb44a6f56d2b1c3cadf956 [file] [log] [blame]
Annie Chin17f85952016-03-24 17:12:30 -07001package com.android.launcher3;
2
Sunny Goyale529a862019-08-06 09:48:36 -07003import static com.android.launcher3.util.MainThreadInitializedObject.forOverride;
4
Sunny Goyal3e9be432017-01-05 15:22:41 -08005import android.content.pm.LauncherActivityInfo;
Annie Chin17f85952016-03-24 17:12:30 -07006import android.graphics.drawable.Drawable;
Annie Chin17f85952016-03-24 17:12:30 -07007
Sunny Goyale529a862019-08-06 09:48:36 -07008import com.android.launcher3.util.MainThreadInitializedObject;
Sunny Goyal7f920b82018-06-27 15:47:49 -07009import com.android.launcher3.util.ResourceBasedOverride;
10
Sunny Goyal7f920b82018-06-27 15:47:49 -070011public class IconProvider implements ResourceBasedOverride {
Annie Chin17f85952016-03-24 17:12:30 -070012
Sunny Goyale529a862019-08-06 09:48:36 -070013 public static MainThreadInitializedObject<IconProvider> INSTANCE =
14 forOverride(IconProvider.class, R.string.icon_provider_class);
Annie Chin17f85952016-03-24 17:12:30 -070015
Sunny Goyalae2129e2018-01-24 10:26:35 -080016 public IconProvider() { }
17
Sunny Goyal1a9cbd32018-11-08 10:51:05 -080018 public String getSystemStateForPackage(String systemState, String packageName) {
19 return systemState;
Annie Chin17f85952016-03-24 17:12:30 -070020 }
21
Sunny Goyal1da13892017-06-22 11:03:40 -070022 /**
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 */
26 public Drawable getIcon(LauncherActivityInfo info, int iconDpi, boolean flattenDrawable) {
Annie Chin17f85952016-03-24 17:12:30 -070027 return info.getIcon(iconDpi);
28 }
29}