summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Garnes <matt@cyngn.com>2014-06-20 14:19:43 -0700
committerMatt Garnes <matt@cyngn.com>2014-06-20 15:22:32 -0700
commit130110f316db7592a7e2d15f74c8fb60d1e4cc2a (patch)
tree518f89d24ba989b8560bf52b069b1456c4f55a1c /src
parent0c0cc5d5b9f09904acbff01868eb754e78dbc260 (diff)
downloadandroid_packages_apps_Trebuchet-130110f316db7592a7e2d15f74c8fb60d1e4cc2a.tar.gz
android_packages_apps_Trebuchet-130110f316db7592a7e2d15f74c8fb60d1e4cc2a.tar.bz2
android_packages_apps_Trebuchet-130110f316db7592a7e2d15f74c8fb60d1e4cc2a.zip
Fix CustomContent/CMHome bugs with settings.
1. If Search Panel / CMHome is enabled, it would become visible in overview mode after any setting is toggled. Fixed. 2. If all icons on the last home screen were removed and Search Panel / CMHome is enabled, CMHome would become the only workspace, breaking most things. Fixed. Change-Id: I5a31e8058f71922c2790c6ac43b09ed7bcbe768a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java1
-rw-r--r--src/com/android/launcher3/Workspace.java20
2 files changed, 3 insertions, 18 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2947eda0f..a8f24ef38 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -4894,6 +4894,7 @@ public class Launcher extends Activity
// Synchronized reload
mModel.startLoader(true, mWorkspace.getCurrentPage());
+ mWorkspace.updateCustomContentVisibility();
}
}
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index c67ca9395..7e3584115 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1638,13 +1638,7 @@ public class Workspace extends SmoothPagedView
}
public int numCustomPages() {
- // GEL integration is a special case (not a *real* screen) and should
- // not be counted as custom content.
- if(mLauncher.isGelIntegrationEnabled()) {
- return 0;
- } else {
- return hasCustomContent() ? 1 : 0;
- }
+ return hasCustomContent() ? 1 : 0;
}
public boolean isOnOrMovingToCustomContent() {
@@ -2124,11 +2118,6 @@ public class Workspace extends SmoothPagedView
int start = numCustomPages();
int end = getChildCount() - 1;
- // For GEL integration, do not include the first page (GEL)
- if(mLauncher.isGelIntegrationEnabled()) {
- start += 1;
- }
-
range[0] = Math.max(0, Math.min(start, getChildCount() - 1));
range[1] = Math.max(0, end);
}
@@ -4195,12 +4184,7 @@ public class Workspace extends SmoothPagedView
}
public int getCurrentPageOffsetFromCustomContent() {
- int numCustomPages = numCustomPages();
- // Special case where the Gel Integration page must be counted below
- if(mLauncher.isGelIntegrationEnabled() && mLauncher.isGelIntegrationSupported()) {
- numCustomPages += 1;
- }
- return getNextPage() - numCustomPages;
+ return getNextPage() - numCustomPages();
}
/**