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

Commit 9bbc1178 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Temporary decouple snapshot controller from transition." into udc-dev...

Merge "Temporary decouple snapshot controller from transition." into udc-dev am: 1f0b42df am: c60d20fd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22196642



Change-Id: I5bdf4f34a683eaeba6942019790958d668f45de3
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e4292236 c60d20fd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -191,6 +191,9 @@ class ActivitySnapshotController extends AbsAppSnapshotController<ActivityRecord
     * Prepare to handle on transition start. Clear all temporary fields.
     */
    void preTransitionStart() {
        if (shouldDisableSnapshots()) {
            return;
        }
        resetTmpFields();
    }

@@ -283,6 +286,9 @@ class ActivitySnapshotController extends AbsAppSnapshotController<ActivityRecord
     * Called when the visibility of an app changes outside the regular app transition flow.
     */
    void notifyAppVisibilityChanged(ActivityRecord appWindowToken, boolean visible) {
        if (shouldDisableSnapshots()) {
            return;
        }
        if (!visible) {
            resetTmpFields();
            addBelowTopActivityIfExist(appWindowToken.getTask(), mPendingRemoveActivity,
+5 −1
Original line number Diff line number Diff line
@@ -213,8 +213,12 @@ class SnapshotController {

    void notifyAppVisibilityChanged(ActivityRecord appWindowToken, boolean visible) {
        if (!visible && hasTransitionStateConsumer(TASK_CLOSE)) {
            final Task task = appWindowToken.getTask();
            if (task == null || task.isVisibleRequested()) {
                return;
            }
            // close task transition
            addTransitionRecord(TASK_CLOSE, false /*open*/, appWindowToken.getTask());
            addTransitionRecord(TASK_CLOSE, false /*open*/, task);
            mActivitySnapshotController.preTransitionStart();
            notifyTransition(TASK_CLOSE);
            mActivitySnapshotController.postTransitionStart();
+7 −1
Original line number Diff line number Diff line
@@ -1227,7 +1227,13 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
        // transferred. If transition is transient, IME won't be moved during the transition and
        // the tasks are still live, so we take the snapshot at the end of the transition instead.
        if (mTransientLaunches == null) {
            mController.mSnapshotController.onTransitionReady(mType, mParticipants);
            for (int i = mParticipants.size() - 1; i >= 0; --i) {
                final ActivityRecord ar = mParticipants.valueAt(i).asActivityRecord();
                if (ar == null || ar.getTask() == null
                        || ar.getTask().isVisibleRequested()) continue;
                mController.mSnapshotController.mTaskSnapshotController.recordSnapshot(
                        ar.getTask(), false /* allowSnapshotHome */);
            }
        }

        // This is non-null only if display has changes. It handles the visible windows that don't