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
This commit is contained in:
Louis Begin
2017-02-27 14:33:11 +08:00
committed by Sunny Goyal
parent 3ba48fa019
commit b07a355fe2
3 changed files with 21 additions and 6 deletions

View File

@@ -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();