Merge "Clear the staled mFocusedView when toast surface is closed." into tm-qpr-dev am: a6f9b4b76b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19956349 Change-Id: I171d868062472749de8955f4e4e6f857a36ec922 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -84,6 +84,7 @@ public class ActivityAllAppsContainerView<T extends Context & AppLauncher
|
|||||||
|
|
||||||
/** Invoke when the current search session is finished. */
|
/** Invoke when the current search session is finished. */
|
||||||
public void onClearSearchResult() {
|
public void onClearSearchResult() {
|
||||||
|
getMainAdapterProvider().clearHighlightedItem();
|
||||||
animateToSearchState(false);
|
animateToSearchState(false);
|
||||||
rebindAdapters();
|
rebindAdapters();
|
||||||
}
|
}
|
||||||
@@ -92,6 +93,7 @@ public class ActivityAllAppsContainerView<T extends Context & AppLauncher
|
|||||||
* Sets results list for search
|
* Sets results list for search
|
||||||
*/
|
*/
|
||||||
public void setSearchResults(ArrayList<AdapterItem> results) {
|
public void setSearchResults(ArrayList<AdapterItem> results) {
|
||||||
|
getMainAdapterProvider().clearHighlightedItem();
|
||||||
if (getSearchResultList().setSearchResults(results)) {
|
if (getSearchResultList().setSearchResults(results)) {
|
||||||
getSearchRecyclerView().onSearchResultsChanged();
|
getSearchRecyclerView().onSearchResultsChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,4 +84,9 @@ public class DefaultSearchAdapterProvider extends SearchAdapterProvider<AppLaunc
|
|||||||
public RecyclerView.ItemDecoration getDecorator() {
|
public RecyclerView.ItemDecoration getDecorator() {
|
||||||
return mDecoration;
|
return mDecoration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearHighlightedItem() {
|
||||||
|
mHighlightedView = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,4 +58,9 @@ public abstract class SearchAdapterProvider<T extends ActivityContext> extends B
|
|||||||
* Returns the item decorator.
|
* Returns the item decorator.
|
||||||
*/
|
*/
|
||||||
public abstract RecyclerView.ItemDecoration getDecorator();
|
public abstract RecyclerView.ItemDecoration getDecorator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the highlighted view.
|
||||||
|
*/
|
||||||
|
public abstract void clearHighlightedItem();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user