summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
authorLouis Begin <w15621@motorola.com>2017-02-27 14:33:11 +0800
committerSunny Goyal <sunnygoyal@google.com>2017-03-08 16:10:46 -0800
commitb07a355fe24d70b4affbe2afaf74a8568b2e0e08 (patch)
tree69a7f3f438bbea41c1502400a52bdb89a136ac52 /src/com/android/launcher3/Workspace.java
parent3ba48fa019048b69aace5c88373bb3c59f3c2c1d (diff)
downloadandroid_packages_apps_Trebuchet-b07a355fe24d70b4affbe2afaf74a8568b2e0e08.tar.gz
android_packages_apps_Trebuchet-b07a355fe24d70b4affbe2afaf74a8568b2e0e08.tar.bz2
android_packages_apps_Trebuchet-b07a355fe24d70b4affbe2afaf74a8568b2e0e08.zip
Add checks for FeatureFlags.QSB_ON_FIRST_SCREEN
When false, it correctly does not show the QSB but leaves a default style search bar which cannot be removed. Add checks to control default view visibility in device profile layout & re-layout, QSB container and in Workspace's onMeasure Bug: 35967694 Change-Id: I3d0f89e1022d838eeb95762fd1fb3f7257956c41
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index ef00a8d60..7562dd8b3 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -643,7 +643,8 @@ public class Workspace extends PagedView
// of workspace despite that it's not a true child.
// Note that it relies on the strict ordering of measuring the workspace before the QSB
// at the dragLayer level.
- if (getChildCount() > 0) {
+ // Only measure the QSB when the view is enabled
+ if (FeatureFlags.QSB_ON_FIRST_SCREEN && getChildCount() > 0) {
CellLayout firstPage = (CellLayout) getChildAt(0);
int cellHeight = firstPage.getCellHeight();