Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98d6a402 authored by Holly Sun's avatar Holly Sun
Browse files

Clear the staled mFocusedView when toast surface is closed.

Test: manual
Bug: 224756660
Change-Id: Iadce94f9138ee375fa9b6e3ef8fb685847312045
parent 455c942f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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();
        }
+5 −0
Original line number Diff line number Diff line
@@ -84,4 +84,9 @@ public class DefaultSearchAdapterProvider extends SearchAdapterProvider<AppLaunc
    public RecyclerView.ItemDecoration getDecorator() {
        return mDecoration;
    }

    @Override
    public void clearHighlightedItem() {
        mHighlightedView = null;
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -58,4 +58,9 @@ public abstract class SearchAdapterProvider<T extends ActivityContext> extends B
     * Returns the item decorator.
     */
    public abstract RecyclerView.ItemDecoration getDecorator();

    /**
     * Clear the highlighted view.
     */
    public abstract void clearHighlightedItem();
}