summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/ShortcutInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/ShortcutInfo.java')
-rw-r--r--src/com/android/launcher3/ShortcutInfo.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java
index 08ffaa299..9f7da6c3d 100644
--- a/src/com/android/launcher3/ShortcutInfo.java
+++ b/src/com/android/launcher3/ShortcutInfo.java
@@ -84,6 +84,11 @@ public class ShortcutInfo extends ItemInfo {
boolean usingFallbackIcon;
/**
+ * Indicates whether we're using a low res icon
+ */
+ boolean usingLowResIcon;
+
+ /**
* If isShortcut=true and customIcon=false, this contains a reference to the
* shortcut icon as an application's resource.
*/
@@ -192,7 +197,8 @@ public class ShortcutInfo extends ItemInfo {
public void updateIcon(IconCache iconCache) {
if (itemType == Favorites.ITEM_TYPE_APPLICATION) {
- iconCache.getTitleAndIcon(this, promisedIntent != null ? promisedIntent : intent, user);
+ iconCache.getTitleAndIcon(this, promisedIntent != null ? promisedIntent : intent, user,
+ shouldUseLowResIcon());
}
}
@@ -264,5 +270,9 @@ public class ShortcutInfo extends ItemInfo {
mInstallProgress = progress;
status |= FLAG_INSTALL_SESSION_ACTIVE;
}
+
+ public boolean shouldUseLowResIcon() {
+ return usingLowResIcon && container >= 0 && rank >= FolderIcon.NUM_ITEMS_IN_PREVIEW;
+ }
}