blob: 6872515143bc9ee978a0b3bbdb3a2e4adb586645 [file] [log] [blame]
Annie Chin17f85952016-03-24 17:12:30 -07001package com.android.launcher3;
2
Sunny Goyal3e9be432017-01-05 15:22:41 -08003import android.content.pm.LauncherActivityInfo;
Annie Chin17f85952016-03-24 17:12:30 -07004import android.graphics.drawable.Drawable;
Annie Chin17f85952016-03-24 17:12:30 -07005
Annie Chin17f85952016-03-24 17:12:30 -07006import java.util.Locale;
7
8public class IconProvider {
9
10 private static final boolean DBG = false;
11 private static final String TAG = "IconProvider";
12
13 protected String mSystemState;
14
15 public IconProvider() {
16 updateSystemStateString();
17 }
18
Annie Chin17f85952016-03-24 17:12:30 -070019 public void updateSystemStateString() {
20 mSystemState = Locale.getDefault().toString();
21 }
22
23 public String getIconSystemState(String packageName) {
24 return mSystemState;
25 }
26
Sunny Goyal1da13892017-06-22 11:03:40 -070027 /**
28 * @param flattenDrawable true if the caller does not care about the specification of the
29 * original icon as long as the flattened version looks the same.
30 */
31 public Drawable getIcon(LauncherActivityInfo info, int iconDpi, boolean flattenDrawable) {
Annie Chin17f85952016-03-24 17:12:30 -070032 return info.getIcon(iconDpi);
33 }
34}