diff options
author | Matt Garnes <matt@cyngn.com> | 2014-06-20 13:39:50 -0700 |
---|---|---|
committer | Matt Garnes <matt@cyngn.com> | 2014-07-15 12:02:49 -0700 |
commit | 4a65b0c3022357d2b14db196224931cc35f14417 (patch) | |
tree | a7cf6c311589d8430f0a50627d894815380ad7da /src/com/android/launcher3/Workspace.java | |
parent | 7a1a596b98941f7bda517e5c401086e57c9dff61 (diff) | |
download | android_packages_apps_Trebuchet-4a65b0c3022357d2b14db196224931cc35f14417.tar.gz android_packages_apps_Trebuchet-4a65b0c3022357d2b14db196224931cc35f14417.tar.bz2 android_packages_apps_Trebuchet-4a65b0c3022357d2b14db196224931cc35f14417.zip |
Add support for CMHome (1/2)
Add permission for DashClock extensions.
Change Trebuchet to allow viewing additional screen.
Add setting that to configure Google Now / CMHome.
Change-Id: I63286a2cce87455ed411bd4c77680200eec89be7
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); |