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.
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 88f074c..fa272b9 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -804,7 +804,7 @@
private Canvas mSelectionCanvas;
boolean mHasSurface = false;
- private boolean mAppsDirty = false;
+ private boolean mAppsDirty = true;
Params mParams;
State mState;
@@ -1051,7 +1051,7 @@
void dirtyCheck() {
if (mHasSurface) {
- if (mAppsDirty) {
+ if (mAppsDirty && mAllAppsList != null) {
for (int i=0; i < mState.iconCount; i++) {
uploadAppIcon(i, mAllAppsList.get(i));
}