diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index 08b42cd24c..c86f08d1fb 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -102,6 +102,16 @@ public class ActivityAllAppsContainerView results, int searchResultCode) { + setSearchResults(results); + } + private void animateToSearchState(boolean goingToSearch) { animateToSearchState(goingToSearch, DEFAULT_SEARCH_TRANSITION_DURATION_MS); } @@ -311,7 +321,7 @@ public class ActivityAllAppsContainerView { + // Search Result Codes + int UNKNOWN = 0; + int INTERMEDIATE = 1; + int FINAL = 2; + /** * Called when the search from primary source is complete. * @@ -31,6 +36,17 @@ public interface SearchCallback { */ void onSearchResult(String query, ArrayList items); + /** + * Called when the search from primary source is complete. + * + * @param items list of search results + * @param searchResultCode indicates if the result is final or intermediate for a given query + * since we can get search results from multiple sources. + */ + default void onSearchResult(String query, ArrayList items, int searchResultCode) { + onSearchResult(query, items); + } + /** * Called when the search results should be cleared. */