diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-05-22 22:00:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-05-22 22:00:05 +0000 |
commit | 085cebc741d61378b5b544c5b0f1ad76d6915ebc (patch) | |
tree | c8832aa166179e253cdb9a71166682e8f807878d /src/com/android/launcher3/graphics/LauncherIcons.java | |
parent | d1134a02952f259b8241faea85d0b848dd1dd1aa (diff) | |
parent | fbf327f9ee569ba8e48ce477e25c83ebac0b3b90 (diff) | |
download | android_packages_apps_Trebuchet-085cebc741d61378b5b544c5b0f1ad76d6915ebc.tar.gz android_packages_apps_Trebuchet-085cebc741d61378b5b544c5b0f1ad76d6915ebc.tar.bz2 android_packages_apps_Trebuchet-085cebc741d61378b5b544c5b0f1ad76d6915ebc.zip |
Merge "Skip processing fallback icons as they are already badged and have shadow" into ub-launcher3-edmonton
Diffstat (limited to 'src/com/android/launcher3/graphics/LauncherIcons.java')
-rw-r--r-- | src/com/android/launcher3/graphics/LauncherIcons.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/launcher3/graphics/LauncherIcons.java b/src/com/android/launcher3/graphics/LauncherIcons.java index 3b5585bcf..f020d2d7c 100644 --- a/src/com/android/launcher3/graphics/LauncherIcons.java +++ b/src/com/android/launcher3/graphics/LauncherIcons.java @@ -360,16 +360,18 @@ public class LauncherIcons implements AutoCloseable { .getShortcutIconDrawable(shortcutInfo, mFillResIconDpi); IconCache cache = LauncherAppState.getInstance(mContext).getIconCache(); - Bitmap unbadgedBitmap = null; + final Bitmap unbadgedBitmap; if (unbadgedDrawable != null) { unbadgedBitmap = createScaledBitmapWithoutShadow(unbadgedDrawable, 0); } else { if (fallbackIconProvider != null) { - unbadgedBitmap = fallbackIconProvider.get(); - } - if (unbadgedBitmap == null) { - unbadgedBitmap = cache.getDefaultIcon(Process.myUserHandle()).icon; + // Fallback icons are already badged and with appropriate shadow + Bitmap fullIcon = fallbackIconProvider.get(); + if (fullIcon != null) { + return createIconBitmap(fullIcon); + } } + unbadgedBitmap = cache.getDefaultIcon(Process.myUserHandle()).icon; } BitmapInfo result = new BitmapInfo(); |