From 85f4c44a65bc0d73143c369497c693e48bf6c0ad Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 14 Apr 2025 17:51:08 +0530 Subject: [PATCH] icon: Don't set color for adaptive icon --- .../src/com/android/launcher3/icons/BaseIconFactory.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java index 842d0eb0..3de32355 100644 --- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java +++ b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java @@ -38,7 +38,6 @@ import androidx.annotation.ColorInt; import androidx.annotation.IntDef; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.core.graphics.ColorUtils; import com.android.launcher3.icons.BitmapInfo.Extender; import com.android.launcher3.util.FlagOp; @@ -325,14 +324,12 @@ public class BaseIconFactory implements AutoCloseable { FixedScaleDrawable fsd = ((FixedScaleDrawable) dr.getForeground()); fsd.setDrawable(icon); - int color; + int color = mWrapperBackgroundColor; if (icon.getIntrinsicHeight() > 0 && icon.getIntrinsicWidth() > 0) { Bitmap bitmap = AdaptiveIconGenerator.toBitmap(icon); fsd.setScale(AdaptiveIconGenerator.getScale(bitmap, scale)); - color = ColorUtils.setAlphaComponent(new ColorExtractor().findDominantColorByHue(bitmap), 200); } else { fsd.setScale(scale); - color = mWrapperBackgroundColor; } icon = dr; -- GitLab