mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Background: PackageInfo may not have changed but when upgrading from N to O, the icon cache need to refresh in order to show Adaptive icons. Bug: 65062494 Change-Id: If3bf579c3dd035fe8d4e10c5741532fdb2a9d6fe
36 lines
986 B
Java
36 lines
986 B
Java
package com.android.launcher3;
|
|
|
|
import android.content.pm.LauncherActivityInfo;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.os.Build;
|
|
|
|
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() + "," + Build.VERSION.SDK_INT;
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|