summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-09-21 19:34:13 -0700
committerJason Sams <rjsams@android.com>2009-09-21 19:34:13 -0700
commitbea627791d7b1f4ecfeedb38695a57d76fc7a2ac (patch)
treea4bf1844f295b9fe8002bf200dff5dc3e79c3bae
parent924423076381925909c4e3cb176fc16fe6d21462 (diff)
downloadandroid_packages_apps_Trebuchet-bea627791d7b1f4ecfeedb38695a57d76fc7a2ac.tar.gz
android_packages_apps_Trebuchet-bea627791d7b1f4ecfeedb38695a57d76fc7a2ac.tar.bz2
android_packages_apps_Trebuchet-bea627791d7b1f4ecfeedb38695a57d76fc7a2ac.zip
Don't call data on zero size allocations.
-rw-r--r--src/com/android/launcher2/AllAppsView.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 9f9018e78..e8911c59f 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -628,13 +628,13 @@ public class AllAppsView extends RSSurfaceView
mLabelIds[i] = mLabels[i].getID();
}
- mAllocIconID.data(mIconIds);
- mAllocLabelID.data(mLabelIds);
+ if(count > 0) {
+ mAllocIconID.data(mIconIds);
+ mAllocLabelID.data(mLabelIds);
+ }
mState.iconCount = count;
- Log.d("AllAppsView", "mScript=" + mScript + " mAllocIconID=" + mAllocIconID);
-
if (mScript != null) { // wtf
mScript.bindAllocation(mAllocIconID, Defines.ALLOC_ICON_IDS);
mScript.bindAllocation(mAllocLabelID, Defines.ALLOC_LABEL_IDS);