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

Commit f1c0aeda authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #6921726: Prime: Cannot make or receive phone calls...

[NPE at android.graphics.drawable.Drawable.createFromResourceStream]

Change-Id: I223428ffb39e883518aad817227f32851ea18aec
parent 5345c310
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -778,7 +778,8 @@ public abstract class Drawable {
        // to the compatibility density only to have them scaled back up when
        // drawn to the screen.
        if (opts == null) opts = new BitmapFactory.Options();
        opts.inScreenDensity = res.getDisplayMetrics().noncompatDensityDpi;
        opts.inScreenDensity = res != null
                ? res.getDisplayMetrics().noncompatDensityDpi : DisplayMetrics.DENSITY_DEVICE;
        Bitmap  bm = BitmapFactory.decodeResourceStream(res, value, is, pad, opts);
        if (bm != null) {
            byte[] np = bm.getNinePatchChunk();