OSDN Git Service

Fix the bug where the icons stop showing up.
authorJoe Onorato <joeo@android.com>
Fri, 16 Oct 2009 02:49:43 +0000 (19:49 -0700)
committerJoe Onorato <joeo@android.com>
Fri, 16 Oct 2009 02:49:43 +0000 (19:49 -0700)
I think what's happening here is that when there is a configuration
change, we were restarting the launcher process because the driver
would hang.  But now that that's fixed, we need to poke the model
to reload the icons.  We were missing the bind apps call.

src/com/android/launcher2/Launcher.java
src/com/android/launcher2/LauncherModel.java

index 1b9ee1d..bddc9ac 100644 (file)
@@ -227,6 +227,11 @@ public final class Launcher extends Activity
             android.os.Debug.stopMethodTracing();
         }
 
+        // We have a new AllAppsView, we need to re-bind everything, and it could have
+        // changed in our absence.
+        mModel.setAllAppsDirty();
+        mModel.setWorkspaceDirty();
+
         if (!mRestoring) {
             mModel.startLoader(this, true);
         }
index 34cb4fa..12dd016 100644 (file)
@@ -249,6 +249,13 @@ public class LauncherModel {
         mLoader.stopLoader();
     }
 
+    /**
+     * We pick up most of the changes to all apps.
+     */
+    public void setAllAppsDirty() {
+        mLoader.setAllAppsDirty();
+    }
+
     public void setWorkspaceDirty() {
         mLoader.setWorkspaceDirty();
     }