Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58744c31 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '2683-s-pwa_icon' into 'v1-s'

icon: Don't set color for adaptive icon

See merge request !20
parents 7830d92c 6a2f6eda
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;