[Search] Resolve work/personal tab overlap with A-Z list

This issue was caused due to launcher falling out of sync with DEVICE_SEARCH_FLAG. This change makes AllApps views agnostic of search input type when rendering layout.

Bug: 182591985
Test: local
Change-Id: Ic015b68e110eea9ab5184325f2a3633a5c7d15cc
This commit is contained in:
Samuel Fufa
2021-03-23 11:06:09 -05:00
parent dd1026b0c0
commit c6995f3eb2
4 changed files with 4 additions and 16 deletions

View File

@@ -106,8 +106,8 @@ public class FloatingHeaderView extends LinearLayout implements
public FloatingHeaderView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
mHeaderTopPadding = FeatureFlags.ENABLE_DEVICE_SEARCH.get() ? 0 :
context.getResources().getDimensionPixelSize(R.dimen.all_apps_header_top_padding);
mHeaderTopPadding = context.getResources()
.getDimensionPixelSize(R.dimen.all_apps_header_top_padding);
}
@Override
@@ -125,7 +125,6 @@ public class FloatingHeaderView extends LinearLayout implements
}
}
mFixedRows = rows.toArray(new FloatingHeaderRow[rows.size()]);
setPadding(0, mHeaderTopPadding, 0, 0);
mAllRows = mFixedRows;
}
@@ -243,9 +242,7 @@ public class FloatingHeaderView extends LinearLayout implements
public int getMaxTranslation() {
if (mMaxTranslation == 0 && mTabsHidden) {
int paddingOffset = getResources().getDimensionPixelSize(
R.dimen.all_apps_search_bar_bottom_padding);
return FeatureFlags.ENABLE_DEVICE_SEARCH.get() ? 0 : paddingOffset;
return getResources().getDimensionPixelSize(R.dimen.all_apps_search_bar_bottom_padding);
} else if (mMaxTranslation > 0 && mTabsHidden) {
return mMaxTranslation + getPaddingTop();
} else {