Support zero-state suggestions in Taskbar All Apps.

Test: manual
Bug: 216683257
Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR
Change-Id: I016d4e4e6a096ca4f5bd65fcda1bf24a444459f4
This commit is contained in:
Brian Isganitis committed 2023-06-12 17:19:16 +00:00
1 parent 7a69792b26
commit d478b1464e
7 files changed
+63 -2

No files matched your search

@@ -54,6 +54,7 @@ public final class TaskbarAllAppsController {
private AppInfo[] mApps;
private int mAppsModelFlags;
private List<ItemInfo> mPredictedApps;
private @Nullable List<ItemInfo> mZeroStateSearchSuggestions;
private boolean mDisallowGlobalDrag;
private boolean mDisallowLongClick;
@@ -108,6 +109,14 @@ public final class TaskbarAllAppsController {
}
}
/** Updates the current search suggestions. */
public void setZeroStateSearchSuggestions(List<ItemInfo> zeroStateSearchSuggestions) {
mZeroStateSearchSuggestions = zeroStateSearchSuggestions;
if (mSearchSessionController != null) {
mSearchSessionController.setZeroStateSearchSuggestions(zeroStateSearchSuggestions);
}
}
/** Updates the current notification dots. */
public void updateNotificationDots(Predicate<PackageUserKey> updatedDots) {
if (mAppsView != null) {
@@ -143,6 +152,9 @@ public final class TaskbarAllAppsController {
mSearchSessionController = TaskbarSearchSessionController.newInstance(mOverlayContext);
mOverlayContext.setSearchSessionController(mSearchSessionController);
mSearchSessionController.setZeroStatePredictedItems(mPredictedApps);
if (mZeroStateSearchSuggestions != null) {
mSearchSessionController.setZeroStateSearchSuggestions(mZeroStateSearchSuggestions);
}
mSearchSessionController.startLifecycle();
mSlideInView = (TaskbarAllAppsSlideInView) mOverlayContext.getLayoutInflater().inflate(