From ce647cc9ae5456923f2dcfd096cbf42e5ca7b652 Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Wed, 8 Jun 2022 14:46:46 -0700 Subject: [PATCH] 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 --- src/com/android/launcher3/allapps/FloatingHeaderView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/FloatingHeaderView.java b/src/com/android/launcher3/allapps/FloatingHeaderView.java index 515f80af01..641161b9c5 100644 --- a/src/com/android/launcher3/allapps/FloatingHeaderView.java +++ b/src/com/android/launcher3/allapps/FloatingHeaderView.java @@ -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();