summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-04-28 13:11:19 -0700
committercretin45 <cretin45@gmail.com>2016-04-28 13:12:10 -0700
commit4ed36691e3a76bf36903be270a5165cf3069dcac (patch)
tree3673dabe45a14e35cda0f7bd3eb8b05a6aaf2e82
parent0c86fc125cd8cea0ed0f6c4827d159b56709e1cf (diff)
downloadandroid_packages_apps_Trebuchet-4ed36691e3a76bf36903be270a5165cf3069dcac.zip
android_packages_apps_Trebuchet-4ed36691e3a76bf36903be270a5165cf3069dcac.tar.gz
android_packages_apps_Trebuchet-4ed36691e3a76bf36903be270a5165cf3069dcac.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) {