From 6a2f6edaa2d9e5b7ea367b9ab275f402a823cf43 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 88265b87..15ab668d 100644 --- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java +++ b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java @@ -26,7 +26,6 @@ import android.os.Process; import android.os.UserHandle; import androidx.annotation.NonNull; -import androidx.core.graphics.ColorUtils; import com.android.launcher3.icons.BitmapInfo.Extender; @@ -307,14 +306,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