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

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

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

icon: Don't set color for adaptive icon

See merge request !21
parents 7d89f955 85f4c44a
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;