From 660679f91fa1d6a8b7cc8c0ced6bf799e9d9dfba Mon Sep 17 00:00:00 2001 From: Anushree Ganjam Date: Fri, 14 Jul 2023 00:34:00 +0000 Subject: [PATCH] Introduce onAnimateToSearchStateCompleted() in SearchUiDelegate. This will be called when transition animation to search is completed. Bug: 285166099 Flag: NA Test: Manual Change-Id: I69e594cbf3564a866d258654fc23a00410e7deab --- .../launcher3/allapps/ActivityAllAppsContainerView.java | 5 ++++- .../launcher3/allapps/search/AllAppsSearchUiDelegate.java | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index eb4ecaf161..ace4d01640 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -391,7 +391,10 @@ public class ActivityAllAppsContainerView rebindAdapters(false); mRebindAdaptersAfterSearchAnimation = false; } - if (!goingToSearch) { + + if (goingToSearch) { + mSearchUiDelegate.onAnimateToSearchStateCompleted(); + } else { setSearchResults(null); if (mViewPager != null) { mViewPager.setCurrentPage(previousPage); diff --git a/src/com/android/launcher3/allapps/search/AllAppsSearchUiDelegate.java b/src/com/android/launcher3/allapps/search/AllAppsSearchUiDelegate.java index 49cecca19f..2347bfd5a7 100644 --- a/src/com/android/launcher3/allapps/search/AllAppsSearchUiDelegate.java +++ b/src/com/android/launcher3/allapps/search/AllAppsSearchUiDelegate.java @@ -49,6 +49,11 @@ public class AllAppsSearchUiDelegate { // Do nothing. } + /** Invoked when transition animations to go to search is completed . */ + public void onAnimateToSearchStateCompleted() { + // Do nothing + } + /** Invoked when the search bar has been added to All Apps. */ public void onInitializeSearchBar() { // Do nothing.