summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-04-28 13:11:19 -0700
committerEd Carrigan <cretin45@gmail.com>2016-04-28 13:14:23 -0700
commitd42fae494742b0e6e428d84dc4ed61adddb8e6f6 (patch)
treef11614e02d35fa821b0f400645214d537d928c04
parentc20815134a47bd7e2a5653ab6f42b597ff028907 (diff)
downloadandroid_packages_apps_Trebuchet-d42fae494742b0e6e428d84dc4ed61adddb8e6f6.zip
android_packages_apps_Trebuchet-d42fae494742b0e6e428d84dc4ed61adddb8e6f6.tar.gz
android_packages_apps_Trebuchet-d42fae494742b0e6e428d84dc4ed61adddb8e6f6.tar.bz2
Trebuchet: Don't create shadow on 0 width/height icon
Issue-id: CYNGNOS-2646 Change-Id: Iccadeaf28ec5e36b1c5a2f7ce714aa31d4439167 (cherry picked from commit 4ed36691e3a76bf36903be270a5165cf3069dcac)
-rw-r--r--src/com/android/launcher3/HolographicOutlineHelper.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher3/HolographicOutlineHelper.java b/src/com/android/launcher3/HolographicOutlineHelper.java
index 5ff85d6..442cb93 100644
--- a/src/com/android/launcher3/HolographicOutlineHelper.java
+++ b/src/com/android/launcher3/HolographicOutlineHelper.java
@@ -165,6 +165,10 @@ public class HolographicOutlineHelper {
int bitmapWidth = (int) (rect.width() * view.getScaleX());
int bitmapHeight = (int) (rect.height() * view.getScaleY());
+ if (bitmapWidth == 0 || bitmapHeight == 0) {
+ return null;
+ }
+
int key = (bitmapWidth << 16) | bitmapHeight;
Bitmap cache = mBitmapCache.get(key);
if (cache == null) {