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

Commit 64776a2c authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/34250521'] into 25Q4-release.

Change-Id: Ie0b42d3ff61814ce39d08d3809d7adf631ce60ea
parents cdd6acce 9d6794fc
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -174,7 +174,11 @@ public class BaseIconFactory implements AutoCloseable {
                new ColorDrawable(PLACEHOLDER_BACKGROUND_COLOR),
                new CenterTextDrawable(placeholder, color));
        Bitmap icon = createIconBitmap(drawable, ICON_VISIBLE_AREA_FACTOR);
        return BitmapInfo.of(icon, color, getDefaultIconShape());
        BitmapInfo info = BitmapInfo.of(icon, color, getDefaultIconShape());
        if (mDrawFullBleedIcons) {
            info = info.withFlags(FlagOp.NO_OP.addFlag(FLAG_FULL_BLEED));
        }
        return info;
    }

    public BitmapInfo createIconBitmap(Bitmap icon) {
@@ -262,7 +266,6 @@ public class BaseIconFactory implements AutoCloseable {
     * Generates an IconShape based on the current bitmap size and default icon mask.
     */
    public IconShape getDefaultIconShape() {
        if (!mDrawFullBleedIcons) return IconShape.EMPTY;
        if (mDefaultIconShape != null) return mDefaultIconShape;
        AdaptiveIconDrawable tempAdaptiveIcon =
                new AdaptiveIconDrawable(new ColorDrawable(BLACK), null);
+2 −7
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.graphics.drawable.Drawable
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.annotation.IntDef
import com.android.launcher3.icons.BitmapInfo.Companion.FLAG_THEMED
import com.android.launcher3.icons.FastBitmapDrawableDelegate.DelegateFactory
import com.android.launcher3.icons.FastBitmapDrawableDelegate.SimpleDelegateFactory
import com.android.launcher3.icons.PlaceHolderDrawableDelegate.PlaceHolderDelegateFactory
@@ -246,13 +247,7 @@ data class BitmapInfo(

        @JvmStatic
        fun of(bitmap: Bitmap, color: Int, defaultShape: IconShape = IconShape.EMPTY): BitmapInfo {
            val flags = if (defaultShape == IconShape.EMPTY) 0 else FLAG_FULL_BLEED
            return BitmapInfo(
                icon = bitmap,
                color = color,
                defaultIconShape = defaultShape,
                flags = flags,
            )
            return BitmapInfo(icon = bitmap, color = color, defaultIconShape = defaultShape)
        }
    }
}