Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 829264a6 authored by IRIS YANG's avatar IRIS YANG Committed by Android (Google) Code Review
Browse files

Merge "Move/Launch task on the TaskView's display." into sc-v2-dev

parents 494bbb0b 2cdc359b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -654,6 +654,7 @@ public class TaskView extends FrameLayout implements Reusable {
            TestLogging.recordEvent(
                    TestProtocol.SEQUENCE_MAIN, "startActivityFromRecentsAsync", mTask);
            ActivityOptionsWrapper opts =  mActivity.getActivityLaunchOptions(this, null);
            opts.options.setLaunchDisplayId(getRootViewDisplayId());
            if (ActivityManagerWrapper.getInstance()
                    .startActivityFromRecents(mTask.key, opts.options)) {
                RecentsView recentsView = getRecentsView();
@@ -694,6 +695,7 @@ public class TaskView extends FrameLayout implements Reusable {
            // Indicate success once the system has indicated that the transition has started
            ActivityOptions opts = ActivityOptionsCompat.makeCustomAnimation(
                    getContext(), 0, 0, () -> callback.accept(true), MAIN_EXECUTOR.getHandler());
            opts.setLaunchDisplayId(getRootViewDisplayId());
            if (freezeTaskList) {
                ActivityOptionsCompat.setFreezeRecentTasksList(opts);
            }
@@ -1506,6 +1508,10 @@ public class TaskView extends FrameLayout implements Reusable {
        mDigitalWellBeingToast.setBannerColorTint(tintColor, amount);
    }

    private int getRootViewDisplayId() {
        return getRootView().getDisplay().getDisplayId();
    }

    /**
     * We update and subsequently draw these in {@link #setFullscreenProgress(float)}.
     */