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
This commit is contained in:
Toni Barzic committed 2024-10-10 20:21:30 +00:00
1 parent b4b2d16bcc
commit 88011d3ccb
1 file changed
+4
@@ -296,6 +296,10 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
// 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;
}