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.
This commit is contained in:
Joe Onorato
2009-12-11 10:59:51 -08:00
parent 6799f0f9ce
commit 8cf34293dc

View File

@@ -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));
}