From 040a5d2f7a327bd777b5859edea32ed2f1d3593e Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Mon, 16 Sep 2013 17:09:33 -0700 Subject: Ensure we exit overview mode when screen turns off (issue 10750327) Change-Id: I2bd31bf549e2bd88a2fbc958b94e5e1107994162 --- src/com/android/launcher3/Launcher.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 98e9956d8..f8692c0ad 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -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) { -- cgit v1.2.3