bugfix: hide "all apps" view when search starts
Fixes an issue where apps from "all apps" view can still be launched
after search results are visible; which can cause a different app to be
launched when tapped on a search result, or unexpected app launches when
tapped on empty space (below search results).
Testing:
1. open app drawer and search for anything
2. quickly tap on a search result or empty space
3. if tapped on one of the search results, correct app is launched; if
tapped on the empty space, no app is launched
diff --git a/src/com/android/launcher3/allapps/SearchTransitionController.java b/src/com/android/launcher3/allapps/SearchTransitionController.java
index 5056782..29445f4 100644
--- a/src/com/android/launcher3/allapps/SearchTransitionController.java
+++ b/src/com/android/launcher3/allapps/SearchTransitionController.java
@@ -16,6 +16,7 @@
package com.android.launcher3.allapps;
+import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static androidx.recyclerview.widget.RecyclerView.NO_POSITION;
@@ -124,8 +125,8 @@
mSearchToAzAnimator.addListener(forSuccessCallback(onEndRunnable));
mAllAppsContainerView.getFloatingHeaderView().setFloatingRowsCollapsed(true);
- mAllAppsContainerView.getFloatingHeaderView().setVisibility(VISIBLE);
- mAllAppsContainerView.getAppsRecyclerViewContainer().setVisibility(VISIBLE);
+ mAllAppsContainerView.getFloatingHeaderView().setVisibility(GONE);
+ mAllAppsContainerView.getAppsRecyclerViewContainer().setVisibility(GONE);
getSearchRecyclerView().setVisibility(VISIBLE);
getSearchRecyclerView().setChildAttachedConsumer(this::onSearchChildAttached);
mSearchToAzAnimator.start();