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

Commit e8d088d9 authored by Charlie Anderson's avatar Charlie Anderson Committed by Android (Google) Code Review
Browse files

Merge "Adjusts installing app icon size to account for scaled shaped icons" into main

parents 5a10f60b 113d9fc3
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -189,10 +189,14 @@ public class BaseIconFactory implements AutoCloseable {
    @NonNull
    public AdaptiveIconDrawable createShapedAdaptiveIcon(Bitmap iconBitmap) {
        Drawable drawable = new FixedSizeBitmapDrawable(iconBitmap);
        float inset = getExtraInsetFraction();
        if (getIconScale() < 1f) {
            drawable = createScaledDrawable(drawable, 1 / getIconScale());
        }
        float inset = getExtraInsetFraction() * getIconScale();
        inset = inset / (1 + 2 * inset);
        return new AdaptiveIconDrawable(new ColorDrawable(Color.BLACK),
                new InsetDrawable(drawable, inset, inset, inset, inset));
        return new AdaptiveIconDrawable(new ColorDrawable(BLACK),
                new InsetDrawable(drawable, inset, inset, inset, inset)
        );
    }

    @NonNull