diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index 2f623e2637..079264103d 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -18,6 +18,7 @@ package com.android.launcher3.allapps; import static com.android.launcher3.Flags.enableExpandingPauseWorkButton; import static com.android.launcher3.allapps.ActivityAllAppsContainerView.AdapterHolder.MAIN; import static com.android.launcher3.allapps.ActivityAllAppsContainerView.AdapterHolder.SEARCH; +import static com.android.launcher3.allapps.ActivityAllAppsContainerView.AdapterHolder.WORK; import static com.android.launcher3.allapps.BaseAllAppsAdapter.VIEW_TYPE_PRIVATE_SPACE_HEADER; import static com.android.launcher3.allapps.BaseAllAppsAdapter.VIEW_TYPE_WORK_DISABLED_CARD; import static com.android.launcher3.allapps.BaseAllAppsAdapter.VIEW_TYPE_WORK_EDU_CARD; @@ -470,8 +471,9 @@ public class ActivityAllAppsContainerView * @param exitSearch Whether to force exit the search state and return to A-Z apps list. */ public void reset(boolean animate, boolean exitSearch) { + // Scroll Main and Work RV to top. Search RV is done in `resetSearch`. for (int i = 0; i < mAH.size(); i++) { - if (mAH.get(i).mRecyclerView != null) { + if (i != SEARCH && mAH.get(i).mRecyclerView != null) { mAH.get(i).mRecyclerView.scrollToTop(); } } @@ -485,10 +487,8 @@ public class ActivityAllAppsContainerView // Reset the base recycler view after transitioning home. updateHeaderScroll(0); if (exitSearch) { - // Reset the search bar after transitioning home. + // Reset the search bar and search RV after transitioning home. MAIN_EXECUTOR.getHandler().post(mSearchUiManager::resetSearch); - // Animate to A-Z with 0 time to reset the animation with proper state management. - animateToSearchState(false, 0); } if (isSearching()) { mWorkManager.reset();