From 1d8e7bbe09e130af5e9534cc26a65f623be7a424 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Thu, 15 Oct 2009 19:49:43 -0700 Subject: [PATCH] Fix the bug where the icons stop showing up. 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 | 5 +++++ src/com/android/launcher2/LauncherModel.java | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 1b9ee1dd29..bddc9ac3e3 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -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); } diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java index 34cb4fa390..12dd016771 100644 --- a/src/com/android/launcher2/LauncherModel.java +++ b/src/com/android/launcher2/LauncherModel.java @@ -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(); }