Launcher3: 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

Change-Id: I105db932b0beab79ba9a72c234f46be63249d81a
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Mohammad Hasan Keramat J <ikeramat@protonmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
This commit is contained in:
octocorvus 2023-04-02 06:44:45 +00:00 committed by fazilsheik96
parent 85725252e2
commit c51360d5df
1 changed files with 3 additions and 2 deletions

View File

@ -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 @@ public class SearchTransitionController {
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();