Widgets recommendation backend

Add a widgets recommendation mechanism based on AiAI app predication
ranking with the following changes:

1. Only one widget is picked from one app.
2. Widgets that are already added to the workspace are excluded from
   the recommendation.

Test: run PredicationUpdateTaskTest

Bug: 179797520
Change-Id: Ia697bc6df0bae75969e68b7b3de32d57901f7461
This commit is contained in:
Steven Ng
2021-03-02 21:26:00 +00:00
parent 1f4a3414f1
commit 3a8353256a
11 changed files with 461 additions and 5 deletions

View File

@@ -124,7 +124,7 @@ public abstract class BaseModelUpdateTask implements ModelUpdateTask {
public void bindUpdatedWidgets(BgDataModel dataModel) {
final ArrayList<WidgetsListBaseEntry> widgets =
dataModel.widgetsModel.getWidgetsList(mApp.getContext());
dataModel.widgetsModel.getWidgetsListForPicker(mApp.getContext());
scheduleCallbackTask(c -> c.bindAllWidgets(widgets));
}