Clear the staled mFocusedView when toast surface is closed.

Test: manual
Bug: 224756660
Change-Id: Iadce94f9138ee375fa9b6e3ef8fb685847312045
This commit is contained in:
Holly Sun
2022-09-14 14:56:47 -07:00
parent 455c942fd2
commit 98d6a4027a
3 changed files with 12 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ public class ActivityAllAppsContainerView<T extends Context & AppLauncher
/** Invoke when the current search session is finished. */
public void onClearSearchResult() {
getMainAdapterProvider().clearHighlightedItem();
animateToSearchState(false);
rebindAdapters();
}
@@ -92,6 +93,7 @@ public class ActivityAllAppsContainerView<T extends Context & AppLauncher
* Sets results list for search
*/
public void setSearchResults(ArrayList<AdapterItem> results) {
getMainAdapterProvider().clearHighlightedItem();
if (getSearchResultList().setSearchResults(results)) {
getSearchRecyclerView().onSearchResultsChanged();
}