Improve launcher loading performance by only doing re-binds.

This always reloads the workspace, because I think it's a less risky change and that only adds
~100ms.

Change-Id: I215b1f741f022e47ce06e78b9cfdd9967a8f1b9d
This commit is contained in:
Joe Onorato committed 2010-06-08 11:32:28 -07:00
1 parent 843e860e8e
commit cc67f476c0
3 files changed
+84 -96

No files matched your search

+1 -8
View File
@@ -92,7 +92,7 @@ import com.android.launcher.R;
public final class Launcher extends Activity
implements View.OnClickListener, OnLongClickListener, LauncherModel.Callbacks, AllAppsView.Watcher {
static final String TAG = "Launcher";
static final boolean LOGD = true;
static final boolean LOGD = false;
static final boolean PROFILE_STARTUP = false;
static final boolean DEBUG_WIDGETS = false;
@@ -247,11 +247,6 @@ 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);
}
@@ -1856,7 +1851,6 @@ public final class Launcher extends Activity
if (mWorkspaceLoading) {
lockAllApps();
mModel.setWorkspaceDirty();
mModel.startLoader(Launcher.this, false);
} else {
final FolderIcon folderIcon = (FolderIcon)
@@ -1866,7 +1860,6 @@ public final class Launcher extends Activity
getWorkspace().requestLayout();
} else {
lockAllApps();
mModel.setWorkspaceDirty();
mWorkspaceLoading = true;
mModel.startLoader(Launcher.this, false);
}