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

Commit de9590be authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Adding null check when creating icon bitmap

Bug: 24299267
Change-Id: I596e4a8dbd4e45cffff75e6cf7bbbf7ec45c8ec9
parent 8ac727b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -208,7 +208,7 @@ public final class Utilities {
                // Ensure the bitmap has a density.
                // Ensure the bitmap has a density.
                BitmapDrawable bitmapDrawable = (BitmapDrawable) icon;
                BitmapDrawable bitmapDrawable = (BitmapDrawable) icon;
                Bitmap bitmap = bitmapDrawable.getBitmap();
                Bitmap bitmap = bitmapDrawable.getBitmap();
                if (bitmap.getDensity() == Bitmap.DENSITY_NONE) {
                if (bitmap != null && bitmap.getDensity() == Bitmap.DENSITY_NONE) {
                    bitmapDrawable.setTargetDensity(context.getResources().getDisplayMetrics());
                    bitmapDrawable.setTargetDensity(context.getResources().getDisplayMetrics());
                }
                }
            }
            }