summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-03-26 06:20:31 -0700
committerMichael Jurka <mikejurka@google.com>2012-03-26 10:58:16 -0700
commitc7e52f55d631319b970922edd28b45743624998e (patch)
tree549bedb516140c7d2adb1f90c881acfa665edc19 /src
parent7bdeb601f952efd3b14ff9402a204f775c88cc85 (diff)
downloadandroid_packages_apps_Trebuchet-c7e52f55d631319b970922edd28b45743624998e.tar.gz
android_packages_apps_Trebuchet-c7e52f55d631319b970922edd28b45743624998e.tar.bz2
android_packages_apps_Trebuchet-c7e52f55d631319b970922edd28b45743624998e.zip
Fixing potential crash when trying to create 0x0 bitmaps
Bug: 5926437 Change-Id: Id1284584104b1c4933525ea5e8744338718e4986
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 039ee8aaf..f0c7f3467 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -1107,6 +1107,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
bitmapWidth = drawable.getIntrinsicWidth();
bitmapHeight = drawable.getIntrinsicHeight();
} else {
+ if (cellHSpan < 1) cellHSpan = 1;
+ if (cellVSpan < 1) cellVSpan = 1;
// Determine the size of the bitmap for the preview image we will generate
// TODO: This actually uses the apps customize cell layout params, where as we make want
// the Workspace params for more accuracy.