From 88011d3ccb6f1c99bbb62b79e591fbf33b97b84a Mon Sep 17 00:00:00 2001 From: Toni Barzic Date: Wed, 2 Oct 2024 05:05:35 +0000 Subject: [PATCH] Focus search container by default Test: Open all apps view from taskbar, start typing, verify search session starts with the typed query. Bug: 361627643 Flag: EXEMPT bug fix Change-Id: Ibe946a0d4c1f7197099a4a656d8874785aac1ee4 --- .../launcher3/allapps/ActivityAllAppsContainerView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index 10947683bb..0dd2791f5b 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -296,6 +296,10 @@ public class ActivityAllAppsContainerView // Add the search box above everything else in this container (if the flag is enabled, // it's added to drag layer in onAttach instead). addView(mSearchContainer); + // The search container is visually at the top of the all apps UI, and should thus be + // focused by default. It's added to end of the children list, so it needs to be + // explicitly marked as focused by default. + mSearchContainer.setFocusedByDefault(true); } mSearchUiManager = (SearchUiManager) mSearchContainer; }