From 135eee0410884959e1df77f21e8aee836728d24e Mon Sep 17 00:00:00 2001 From: Anushree Ganjam Date: Tue, 25 Jul 2023 21:08:43 +0000 Subject: [PATCH] Post the mSearchUiManager.resetSearch() to next frame. SearchBox gets cleared in the current frame even before we read the input entered by the user. So clear the searchbox in next frame after onAllAppsTransitionEnd is completed. See ag/22266746 where this change was introduced and I want to move the resetSearch() call to next frame. Bug: 287693114 Test: Manual . Tested with both Floating search box on and off. Flag: NA Change-Id: I11509cf652f96847ad3c54f20a76f2a728775fe3 --- .../launcher3/allapps/ActivityAllAppsContainerView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index 4c86becfed..6ad5221749 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -22,6 +22,7 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_ALL_APPS_RV_PREIN import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_COUNT; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_TAP_ON_PERSONAL_TAB; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_TAP_ON_WORK_TAB; +import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.ScrollableLayoutManager.PREDICTIVE_BACK_MIN_SCALE; import android.animation.Animator; @@ -461,7 +462,7 @@ public class ActivityAllAppsContainerView updateHeaderScroll(0); if (exitSearch) { // Reset the search bar after transitioning home. - mSearchUiManager.resetSearch(); + MAIN_EXECUTOR.getHandler().post(mSearchUiManager::resetSearch); // Animate to A-Z with 0 time to reset the animation with proper state management. animateToSearchState(false, 0); }