OSDN Git Service

Ensure we exit overview mode when screen turns off (issue 10750327)
authorAdam Cohen <adamcohen@google.com>
Tue, 17 Sep 2013 00:09:33 +0000 (17:09 -0700)
committerAdam Cohen <adamcohen@google.com>
Tue, 17 Sep 2013 00:11:20 +0000 (17:11 -0700)
Change-Id: I2bd31bf549e2bd88a2fbc958b94e5e1107994162

src/com/android/launcher3/Launcher.java

index 98e9956..f8692c0 100644 (file)
@@ -1428,7 +1428,7 @@ public class Launcher extends Activity
                 // processing a multi-step drop
                 if (mAppsCustomizeTabHost != null && mPendingAddInfo.container == ItemInfo.NO_ID) {
                     mAppsCustomizeTabHost.reset();
-                    showWorkspace(false);
+                    showWorkspaceAndExitOverviewMode(false);
                 }
             } else if (Intent.ACTION_USER_PRESENT.equals(action)) {
                 mUserPresent = true;
@@ -1634,7 +1634,7 @@ public class Launcher extends Activity
                     // If we are already on home, then just animate back to the workspace,
                     // otherwise, just wait until onResume to set the state back to Workspace
                     if (alreadyOnHome) {
-                        showWorkspaceAndExitOverviewMode();
+                        showWorkspaceAndExitOverviewMode(true);
                     } else {
                         mOnResumeState = State.WORKSPACE;
                     }
@@ -1668,12 +1668,15 @@ public class Launcher extends Activity
         }
     }
 
-    protected void showWorkspaceAndExitOverviewMode() {
-        showWorkspace(true);
+    protected void showWorkspaceAndExitOverviewMode(boolean animate) {
+        showWorkspace(animate);
         if (mWorkspace.isInOverviewMode()) {
-            mWorkspace.exitOverviewMode(true);
+            mWorkspace.exitOverviewMode(animate);
         }
     }
+    protected void showWorkspaceAndExitOverviewMode() {
+        showWorkspaceAndExitOverviewMode(true);
+    }
 
     @Override
     public void onRestoreInstanceState(Bundle state) {