From 8cf34293dc2f078bf023ac77d007f5182f9b9357 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Fri, 11 Dec 2009 10:59:51 -0800 Subject: [PATCH] Launcher2 - This might fix the missing app problem and the crash in removeApp. This marks the apps list as dirty by default. Usually, because of how long it takes the loader thread to run, the apps list comes in after the surface has been initialized. However, if the surface isn't around yet when setApps is called, then setApps won't set mRollo.mAppsDirty because mRollo is null. The extra null check is necessary for the normal case when mAllAppsList isn't ready yet when the surface comes in. --- src/com/android/launcher2/AllAppsView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java index 88f074cdd8..fa272b91f3 100644 --- a/src/com/android/launcher2/AllAppsView.java +++ b/src/com/android/launcher2/AllAppsView.java @@ -804,7 +804,7 @@ public class AllAppsView extends RSSurfaceView private Canvas mSelectionCanvas; boolean mHasSurface = false; - private boolean mAppsDirty = false; + private boolean mAppsDirty = true; Params mParams; State mState; @@ -1051,7 +1051,7 @@ public class AllAppsView extends RSSurfaceView void dirtyCheck() { if (mHasSurface) { - if (mAppsDirty) { + if (mAppsDirty && mAllAppsList != null) { for (int i=0; i < mState.iconCount; i++) { uploadAppIcon(i, mAllAppsList.get(i)); }