diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-09-28 18:46:18 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-28 18:46:18 +0000 |
commit | 81284287a761a9ee512bd7d4857995fdd8d8dcbc (patch) | |
tree | 7725cbf636cd7f0b19d4aa17d93d4226fc6fe61b | |
parent | f768d934682ba80da89d454543928e629a44103d (diff) | |
parent | de9590be4ca2779ae0f7f64a48ac8b90472484f8 (diff) | |
download | android_packages_apps_Trebuchet-81284287a761a9ee512bd7d4857995fdd8d8dcbc.tar.gz android_packages_apps_Trebuchet-81284287a761a9ee512bd7d4857995fdd8d8dcbc.tar.bz2 android_packages_apps_Trebuchet-81284287a761a9ee512bd7d4857995fdd8d8dcbc.zip |
am de9590be: Adding null check when creating icon bitmap
* commit 'de9590be4ca2779ae0f7f64a48ac8b90472484f8':
Adding null check when creating icon bitmap
-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 d5b28985c..d054da31c 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -211,7 +211,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()); } } |