summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/IconCache.java
diff options
context:
space:
mode:
authorMario Bertschler <bmario@google.com>2017-08-08 16:26:18 -0700
committerMario Bertschler <bmario@google.com>2017-08-24 12:23:06 -0700
commit8ff9e1d6790d64eb5f8ad9e9721e607978b50583 (patch)
tree20f615100c3abb597c7946baf546eaaa667fde7e /src/com/android/launcher3/IconCache.java
parent9b745a82bf5cf8bf9383b63179d0a750e9ab9ab6 (diff)
downloadandroid_packages_apps_Trebuchet-8ff9e1d6790d64eb5f8ad9e9721e607978b50583.tar.gz
android_packages_apps_Trebuchet-8ff9e1d6790d64eb5f8ad9e9721e607978b50583.tar.bz2
android_packages_apps_Trebuchet-8ff9e1d6790d64eb5f8ad9e9721e607978b50583.zip
Integrating suggested app by handling new status flags for shortcut items.
Guarded via feature flag SUGGESTED_APP. Bug: 62483883 Change-Id: I7e0c8a9875bc37c435aa4316b44322a628cd4826
Diffstat (limited to 'src/com/android/launcher3/IconCache.java')
-rw-r--r--src/com/android/launcher3/IconCache.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index 3bcd7afb4..ecadb18ef 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -478,6 +478,12 @@ public class IconCache {
}
private void applyCacheEntry(CacheEntry entry, ItemInfoWithIcon info) {
+ if (info instanceof ShortcutInfo
+ && ((ShortcutInfo) info).hasStatusFlag(ShortcutInfo.FLAG_SUPPORTS_WEB_UI)
+ && (entry.icon == null || isDefaultIcon(entry.icon, info.user))) {
+ // skip updating shortcut info if no icon and supports web ui
+ return;
+ }
info.title = Utilities.trim(entry.title);
info.contentDescription = entry.contentDescription;
info.iconBitmap = entry.icon == null ? getDefaultIcon(info.user) : entry.icon;