OSDN Git Service

Removing extra clear, load and bind of default workspace
authorAdam Cohen <adamcohen@google.com>
Sat, 17 May 2014 00:05:49 +0000 (17:05 -0700)
committerAdam Cohen <adamcohen@google.com>
Sat, 17 May 2014 01:26:15 +0000 (18:26 -0700)
-> If the user clicks "start fresh" we don't need to reload the workspace
   since we've already loaded the default workspace from the primary
   load in onCreate.

Change-Id: I43cb9e66fd49403ab6e0723cab1a03edd3dcac1b

src/com/android/launcher3/LauncherClings.java

index a2cce1a..6d84e2b 100644 (file)
@@ -438,11 +438,8 @@ class LauncherClings {
     }
 
     public void dismissMigrationClingUseDefault(View v) {
-        // Clear the workspace
-        LauncherModel model = mLauncher.getModel();
-        model.resetLoadedState(false, true);
-        model.startLoader(false, PagedView.INVALID_RESTORE_PAGE,
-                LauncherModel.LOADER_FLAG_CLEAR_WORKSPACE);
+        // Don't need to do anything special here. We've already loaded the default workspace,
+        // (which is the default loader behavior triggered from Launcher#onCreate.).
 
         // Disable the migration cling
         dismissMigrationCling();