Fix header padding when search not enabled.

This was specifically affecting taskbar all apps with
floating search bar enabled. Header placement should not
be changed in that case.

Fix: 266440950
Test: Manual in taskbar and other all apps surfaces with and
without work profile, floating search flag on and off.

Change-Id: I2296a079cc15387a517c61e6b8a21fa0081cba23
This commit is contained in:
Andy Wickham
2023-01-23 10:49:15 -08:00
parent 1973056e40
commit ad753607d2

View File

@@ -233,7 +233,9 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
super.setupHeader();
removeCustomRules(mHeader);
if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) {
if (!isSearchSupported()) {
layoutWithoutSearchContainer(mHeader, false /* includeTabsMargin */);
} else if (FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()) {
alignParentTop(mHeader, false /* includeTabsMargin */);
} else {
layoutBelowSearchContainer(mHeader, false /* includeTabsMargin */);