mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Revert "Revert "Removing unnecessary iconFactory class when gene..."
Revert submission 25518508-revert-25483550-themed-badge-GJNKEECDMN Reason for revert: Fixed badging bug Reverted changes: /q/submissionid:25518508-revert-25483550-themed-badge-GJNKEECDMN Change-Id: I0f378eaabcb7bdea855b80a33bdec007c9b11436
This commit is contained in:
committed by
Android (Google) Code Review
parent
dad66f4188
commit
3de59f24a0
@@ -79,7 +79,6 @@ import androidx.core.graphics.ColorUtils;
|
||||
|
||||
import com.android.launcher3.dragndrop.FolderAdaptiveIcon;
|
||||
import com.android.launcher3.graphics.TintedDrawableSpan;
|
||||
import com.android.launcher3.icons.BaseIconFactory;
|
||||
import com.android.launcher3.icons.BitmapInfo;
|
||||
import com.android.launcher3.icons.LauncherIcons;
|
||||
import com.android.launcher3.icons.ShortcutCachingLogic;
|
||||
@@ -91,6 +90,7 @@ import com.android.launcher3.pm.UserCache;
|
||||
import com.android.launcher3.shortcuts.ShortcutKey;
|
||||
import com.android.launcher3.shortcuts.ShortcutRequest;
|
||||
import com.android.launcher3.testing.shared.ResourceUtils;
|
||||
import com.android.launcher3.util.FlagOp;
|
||||
import com.android.launcher3.util.IntArray;
|
||||
import com.android.launcher3.util.SplitConfigurationOptions.SplitPositionOption;
|
||||
import com.android.launcher3.util.Themes;
|
||||
@@ -676,12 +676,11 @@ public final class Utilities {
|
||||
}
|
||||
|
||||
if (badge == null) {
|
||||
try (LauncherIcons li = LauncherIcons.obtain(context)) {
|
||||
badge = BitmapInfo.LOW_RES_INFO.withFlags(
|
||||
li.getBitmapFlagOp(new BaseIconFactory.IconOptions().setUser(
|
||||
UserCache.INSTANCE.get(context).getUserInfo(info.user))))
|
||||
.getBadgeDrawable(context, useTheme);
|
||||
}
|
||||
badge = BitmapInfo.LOW_RES_INFO.withFlags(
|
||||
UserCache.INSTANCE.get(context)
|
||||
.getUserInfo(info.user)
|
||||
.applyBitmapInfoFlags(FlagOp.NO_OP))
|
||||
.getBadgeDrawable(context, useTheme);
|
||||
if (badge == null) {
|
||||
badge = new ColorDrawable(Color.TRANSPARENT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user