summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-04-28 13:11:19 -0700
committerTom Powell <zifnab@zifnab06.net>2017-03-26 16:21:09 -0700
commit9c3e299c05cc9ede7750cb2a5b89936193c5e560 (patch)
tree1d85a507f2c1935ef081eb974c63ecaf8f7b81f3
parent51a7d1fa2b802893a36c5abe4e20429dfaddf324 (diff)
downloadandroid_packages_apps_Trebuchet-9c3e299c05cc9ede7750cb2a5b89936193c5e560.zip
android_packages_apps_Trebuchet-9c3e299c05cc9ede7750cb2a5b89936193c5e560.tar.gz
android_packages_apps_Trebuchet-9c3e299c05cc9ede7750cb2a5b89936193c5e560.tar.bz2
Trebuchet: Don't create shadow on 0 width/height icon
Issue-id: CYNGNOS-2646 Change-Id: Iccadeaf28ec5e36b1c5a2f7ce714aa31d4439167
-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) {