Fixes issue where personal/work tabs could overlap search reasults.

When you start searching, the header is set to "collapsed" mode.
This normally hides the tabs indirectly if the height of the
header changed as a result, which happens if there is a prediction
row because the previous height is non-zero but is considered 0
after the collapse. However, if there was no prediction row, the
height was already 0, so the header was not re-initialized, which
is where the tab visibility takes effect.

Fix: 235299156
Test: Manually with and without app predictions enabled and
keyboard default on/off.

Change-Id: I192a700ac83776f30d3207f92636113bdb8a86c5
This commit is contained in:
Andy Wickham
2022-06-08 14:46:46 -07:00
parent d4a79eb99b
commit ce647cc9ae

View File

@@ -209,7 +209,7 @@ public class FloatingHeaderView extends LinearLayout implements
int oldMaxHeight = mMaxTranslation;
updateExpectedHeight();
if (mMaxTranslation != oldMaxHeight) {
if (mMaxTranslation != oldMaxHeight || mCollapsed) {
BaseAllAppsContainerView<?> parent = (BaseAllAppsContainerView<?>) getParent();
if (parent != null) {
parent.setupHeader();