Merge "Revert "Move/Launch task on the TaskView's display."" into sc-v2-dev am: 02fe560dc8

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15659824

Change-Id: I96aa19eb13bf695047c2cc91b7d21970eef96f1c
This commit is contained in:
TreeHugger Robot
2021-08-24 07:30:49 +00:00
committed by Automerger Merge Worker
@@ -674,7 +674,6 @@ public class TaskView extends FrameLayout implements Reusable {
TestLogging.recordEvent( TestLogging.recordEvent(
TestProtocol.SEQUENCE_MAIN, "startActivityFromRecentsAsync", mTask); TestProtocol.SEQUENCE_MAIN, "startActivityFromRecentsAsync", mTask);
ActivityOptionsWrapper opts = mActivity.getActivityLaunchOptions(this, null); ActivityOptionsWrapper opts = mActivity.getActivityLaunchOptions(this, null);
opts.options.setLaunchDisplayId(getRootViewDisplayId());
if (ActivityManagerWrapper.getInstance() if (ActivityManagerWrapper.getInstance()
.startActivityFromRecents(mTask.key, opts.options)) { .startActivityFromRecents(mTask.key, opts.options)) {
RecentsView recentsView = getRecentsView(); RecentsView recentsView = getRecentsView();
@@ -715,7 +714,6 @@ public class TaskView extends FrameLayout implements Reusable {
// Indicate success once the system has indicated that the transition has started // Indicate success once the system has indicated that the transition has started
ActivityOptions opts = ActivityOptionsCompat.makeCustomAnimation( ActivityOptions opts = ActivityOptionsCompat.makeCustomAnimation(
getContext(), 0, 0, () -> callback.accept(true), MAIN_EXECUTOR.getHandler()); getContext(), 0, 0, () -> callback.accept(true), MAIN_EXECUTOR.getHandler());
opts.setLaunchDisplayId(getRootViewDisplayId());
if (freezeTaskList) { if (freezeTaskList) {
ActivityOptionsCompat.setFreezeRecentTasksList(opts); ActivityOptionsCompat.setFreezeRecentTasksList(opts);
} }
@@ -1528,10 +1526,6 @@ public class TaskView extends FrameLayout implements Reusable {
mDigitalWellBeingToast.setBannerColorTint(tintColor, amount); mDigitalWellBeingToast.setBannerColorTint(tintColor, amount);
} }
private int getRootViewDisplayId() {
return getRootView().getDisplay().getDisplayId();
}
/** /**
* We update and subsequently draw these in {@link #setFullscreenProgress(float)}. * We update and subsequently draw these in {@link #setFullscreenProgress(float)}.
*/ */