diff options
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 63e893da1..7501dbf7d 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1309,8 +1309,6 @@ public class Workspace extends SmoothPagedView int customPageIndex = getPageIndexForScreenId(CUSTOM_CONTENT_SCREEN_ID); if (hasCustomContent() && whichPage == customPageIndex && !mCustomContentShowing) { if(!isInOverviewMode()) { - mCustomContentShowing = true; - // Start Google Now and register the gesture to return to Trebuchet mLauncher.onCustomContentLaunch(); } } @@ -1833,10 +1831,14 @@ public class Workspace extends SmoothPagedView int customPageIndex = getPageIndexForScreenId(CUSTOM_CONTENT_SCREEN_ID); // mCustomContentShowing can be lost if the Activity is recreated, // So make sure it is set to the right value. + boolean restoreCustomContentShowing = ((customPageIndex == getCurrentPage()) + || (customPageIndex == getNextPage())) + && hasCustomContent(); mCustomContentShowing = mCustomContentShowing - || (customPageIndex == getCurrentPage() - && hasCustomContent()); - if (mCustomContentShowing && mLauncher.isGelIntegrationEnabled()) { + || restoreCustomContentShowing; + if (mCustomContentShowing + && (mLauncher.getCustomContentMode() == Launcher.CustomContentMode.GEL) + && !isInOverviewMode()) { moveToScreen((customPageIndex + 1), true); } } @@ -4931,7 +4933,7 @@ public class Workspace extends SmoothPagedView int idx = getPageIndexForScreenId(mDefaultScreenId); int ccIndex = getPageIndexForScreenId(CUSTOM_CONTENT_SCREEN_ID); if(hasCustomContent() && (idx == ccIndex || idx == -1) - && mLauncher.isGelIntegrationEnabled()) { + && !isInOverviewMode()) { idx = 1; } moveToScreen(idx, animate); |