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

Commit 84858344 authored by Leon Scroggins's avatar Leon Scroggins Committed by Android (Google) Code Review
Browse files

Merge "Use HARDWARE ALPHA_8 Bitmaps" into tm-dev

parents 2f28ac5c f935dae4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -594,6 +594,11 @@ public abstract class BaseIconCache {
                Bitmap monoBitmap = Bitmap.createBitmap(
                        icon.getWidth(), icon.getHeight(), Config.ALPHA_8);
                monoBitmap.copyPixelsFromBuffer(ByteBuffer.wrap(data));
                Bitmap hwMonoBitmap = monoBitmap.copy(Config.HARDWARE, false /*isMutable*/);
                if (hwMonoBitmap != null) {
                    monoBitmap.recycle();
                    monoBitmap = hwMonoBitmap;
                }
                try (BaseIconFactory factory = getIconFactory()) {
                    entry.bitmap.setMonoIcon(monoBitmap, factory);
                }