Merge changes Iaf02a42a,I8daf3c08 into tm-qpr-dev
* changes:
Enable taskbar EDU tooltip flag.
Add settings asset to persistent Taskbar tooltip.
diff --git a/quickstep/src/com/android/launcher3/model/QuickstepModelDelegate.java b/quickstep/src/com/android/launcher3/model/QuickstepModelDelegate.java
index 118cfc6..ad6ce7d 100644
--- a/quickstep/src/com/android/launcher3/model/QuickstepModelDelegate.java
+++ b/quickstep/src/com/android/launcher3/model/QuickstepModelDelegate.java
@@ -306,6 +306,7 @@
}
private void registerPredictor(PredictorState state, AppPredictor predictor) {
+ state.setTargets(Collections.emptyList());
state.predictor = predictor;
state.predictor.registerPredictionUpdates(
MODEL_EXECUTOR, t -> handleUpdate(state, t));
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java
index 1c11bf7..b680a15 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java
@@ -195,24 +195,32 @@
(Consumer<Task>) foundTask -> {
if (foundTask != null) {
TaskView foundTaskView = recents.getTaskViewByTaskId(foundTask.key.id);
- // There is already a running app of this type, use that as second app.
- recents.confirmSplitSelect(
- foundTaskView,
- foundTaskView.getTask(),
- foundTaskView.getIconView().getDrawable(),
- foundTaskView.getThumbnail(),
- foundTaskView.getThumbnail().getThumbnail(),
- null /* intent */);
- } else {
- // No running app of that type, create a new instance as second app.
- recents.confirmSplitSelect(
- null /* containerTaskView */,
- null /* task */,
- new BitmapDrawable(info.bitmap.icon),
- startingView,
- null /* thumbnail */,
- intent);
+ // TODO (b/266482558): This additional null check is needed because there
+ // are times when our Tasks list doesn't match our TaskViews list (like when
+ // a tile is removed during {@link RecentsView#applyLoadPlan()}. A clearer
+ // state management system is in the works so that we don't need to rely on
+ // null checks as much. See comments at ag/21152798.
+ if (foundTaskView != null) {
+ // There is already a running app of this type, use that as second app.
+ recents.confirmSplitSelect(
+ foundTaskView,
+ foundTaskView.getTask(),
+ foundTaskView.getIconView().getDrawable(),
+ foundTaskView.getThumbnail(),
+ foundTaskView.getThumbnail().getThumbnail(),
+ null /* intent */);
+ return;
+ }
}
+
+ // No running app of that type, create a new instance as second app.
+ recents.confirmSplitSelect(
+ null /* containerTaskView */,
+ null /* task */,
+ new BitmapDrawable(info.bitmap.icon),
+ startingView,
+ null /* thumbnail */,
+ intent);
}
);
}