Merge "Adding support in IconProvider for loading different icons for UI and model use" into ub-launcher3-dorval-polish
This commit is contained in:
committed by
Android (Google) Code Review
commit
9e83ba5a5b
@@ -170,7 +170,11 @@ public class IconCache {
|
||||
}
|
||||
|
||||
public Drawable getFullResIcon(LauncherActivityInfo info) {
|
||||
return mIconProvider.getIcon(info, mIconDpi);
|
||||
return getFullResIcon(info, true);
|
||||
}
|
||||
|
||||
public Drawable getFullResIcon(LauncherActivityInfo info, boolean flattenDrawable) {
|
||||
return mIconProvider.getIcon(info, mIconDpi, flattenDrawable);
|
||||
}
|
||||
|
||||
protected Bitmap makeDefaultIcon(UserHandle user) {
|
||||
|
||||
@@ -24,8 +24,11 @@ public class IconProvider {
|
||||
return mSystemState;
|
||||
}
|
||||
|
||||
|
||||
public Drawable getIcon(LauncherActivityInfo info, int iconDpi) {
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ public class DragView extends FrameLayout {
|
||||
.resolveActivity(info.getIntent(), info.user);
|
||||
outObj[0] = activityInfo;
|
||||
return (activityInfo != null) ? appState.getIconCache()
|
||||
.getFullResIcon(activityInfo) : null;
|
||||
.getFullResIcon(activityInfo, false) : null;
|
||||
} else if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
|
||||
if (info instanceof PendingAddShortcutInfo) {
|
||||
ShortcutConfigActivityInfo activityInfo =
|
||||
|
||||
Reference in New Issue
Block a user