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

Commit 1d340500 authored by Jack Palevich's avatar Jack Palevich Committed by Android Git Automerger
Browse files

am 0c01222f: Merge "Don\'t crash when scaling Bitmaps with private Bitmap.Configs" into jb-dev

* commit '0c01222f':
  Don't crash when scaling Bitmaps with private Bitmap.Configs
parents 2c36609d 0c01222f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -854,7 +854,11 @@ public class RemoteControlClient
                float scale = Math.min((float) maxWidth / width, (float) maxHeight / height);
                int newWidth = Math.round(scale * width);
                int newHeight = Math.round(scale * height);
                Bitmap outBitmap = Bitmap.createBitmap(newWidth, newHeight, bitmap.getConfig());
                Bitmap.Config newConfig = bitmap.getConfig();
                if (newConfig == null) {
                    newConfig = Bitmap.Config.ARGB_8888;
                }
                Bitmap outBitmap = Bitmap.createBitmap(newWidth, newHeight, newConfig);
                Canvas canvas = new Canvas(outBitmap);
                Paint paint = new Paint();
                paint.setAntiAlias(true);