Skip processing fallback icons as they are already badged and have shadow

Bug: 79496830
Change-Id: I3e601fda570eefdb277bfd50c846c5a2864f4b3a
This commit is contained in:
Sunny Goyal
2018-05-17 15:28:41 -07:00
parent 48059dc706
commit fbf327f9ee
@@ -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();