summaryrefslogtreecommitdiffstats
path: root/iconloaderlib
diff options
context:
space:
mode:
Diffstat (limited to 'iconloaderlib')
-rw-r--r--iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
index db5515b74..60320d63b 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
@@ -167,22 +167,19 @@ public class BaseIconFactory implements AutoCloseable {
mCanvas.setBitmap(null);
}
- final Bitmap result;
- if (user != null && !Process.myUserHandle().equals(user)) {
+ if (isInstantApp) {
+ badgeWithDrawable(bitmap, mContext.getDrawable(R.drawable.ic_instant_app_badge));
+ }
+ if (user != null) {
BitmapDrawable drawable = new FixedSizeBitmapDrawable(bitmap);
Drawable badged = mPm.getUserBadgedIcon(drawable, user);
if (badged instanceof BitmapDrawable) {
- result = ((BitmapDrawable) badged).getBitmap();
+ bitmap = ((BitmapDrawable) badged).getBitmap();
} else {
- result = createIconBitmap(badged, 1f);
+ bitmap = createIconBitmap(badged, 1f);
}
- } else if (isInstantApp) {
- badgeWithDrawable(bitmap, mContext.getDrawable(R.drawable.ic_instant_app_badge));
- result = bitmap;
- } else {
- result = bitmap;
}
- return BitmapInfo.fromBitmap(result, mDisableColorExtractor ? null : mColorExtractor);
+ return BitmapInfo.fromBitmap(bitmap, mDisableColorExtractor ? null : mColorExtractor);
}
public Bitmap createScaledBitmapWithoutShadow(Drawable icon, boolean shrinkNonAdaptiveIcons) {