Files
Lawnchair/src/com/android/launcher3/IconProvider.java
T
Sunny Goyal 1da138903b Adding support in IconProvider for loading different icons for UI and model use
Bug: 62900800
Change-Id: I86e2d77efc7e5fc85b59cf18e634546d098d138f
2017-06-22 17:13:46 -07:00

35 lines
931 B
Java

package com.android.launcher3;
import android.content.pm.LauncherActivityInfo;
import android.graphics.drawable.Drawable;
import java.util.Locale;
public class IconProvider {
private static final boolean DBG = false;
private static final String TAG = "IconProvider";
protected String mSystemState;
public IconProvider() {
updateSystemStateString();
}
public void updateSystemStateString() {
mSystemState = Locale.getDefault().toString();
}
public String getIconSystemState(String packageName) {
return mSystemState;
}
/**
* @param flattenDrawable true if the caller does not care about the specification of the
* original icon as long as the flattened version looks the same.
*/
public Drawable getIcon(LauncherActivityInfo info, int iconDpi, boolean flattenDrawable) {
return info.getIcon(iconDpi);
}
}