diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-09-23 12:56:51 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-09-27 19:05:04 +0000 |
commit | de9590be4ca2779ae0f7f64a48ac8b90472484f8 (patch) | |
tree | 13a027c8da47f7c1ca1a948b87ed06d547dca876 /src/com | |
parent | 8ac727b2c6627028960a1efe18ab9c72442eef48 (diff) | |
download | android_packages_apps_Trebuchet-de9590be4ca2779ae0f7f64a48ac8b90472484f8.tar.gz android_packages_apps_Trebuchet-de9590be4ca2779ae0f7f64a48ac8b90472484f8.tar.bz2 android_packages_apps_Trebuchet-de9590be4ca2779ae0f7f64a48ac8b90472484f8.zip |
Adding null check when creating icon bitmap
Bug: 24299267
Change-Id: I596e4a8dbd4e45cffff75e6cf7bbbf7ec45c8ec9
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/Utilities.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index acc809089..6521f15b2 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -208,7 +208,7 @@ public final class Utilities { // Ensure the bitmap has a density. BitmapDrawable bitmapDrawable = (BitmapDrawable) icon; Bitmap bitmap = bitmapDrawable.getBitmap(); - if (bitmap.getDensity() == Bitmap.DENSITY_NONE) { + if (bitmap != null && bitmap.getDensity() == Bitmap.DENSITY_NONE) { bitmapDrawable.setTargetDensity(context.getResources().getDisplayMetrics()); } } |