blob: 4dee2b57db73a93c2189a1eb615894a6f5d52874 [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;
Hyunyoung Song31528272017-08-28 14:27:00 -07005import android.os.Build;
Annie Chin17f85952016-03-24 17:12:30 -07006
Annie Chin17f85952016-03-24 17:12:30 -07007import java.util.Locale;
8
9public class IconProvider {
10
11 private static final boolean DBG = false;
12 private static final String TAG = "IconProvider";
13
14 protected String mSystemState;
15
16 public IconProvider() {
17 updateSystemStateString();
18 }
19
Annie Chin17f85952016-03-24 17:12:30 -070020 public void updateSystemStateString() {
Hyunyoung Song31528272017-08-28 14:27:00 -070021 mSystemState = Locale.getDefault().toString() + "," + Build.VERSION.SDK_INT;
Annie Chin17f85952016-03-24 17:12:30 -070022 }
23
24 public String getIconSystemState(String packageName) {
25 return mSystemState;
26 }
27
Sunny Goyal1da13892017-06-22 11:03:40 -070028 /**
29 * @param flattenDrawable true if the caller does not care about the specification of the
30 * original icon as long as the flattened version looks the same.
31 */
32 public Drawable getIcon(LauncherActivityInfo info, int iconDpi, boolean flattenDrawable) {
Annie Chin17f85952016-03-24 17:12:30 -070033 return info.getIcon(iconDpi);
34 }
35}