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

Commit 98b09531 authored by Jiaming Liu's avatar Jiaming Liu
Browse files

Fix visibility in trampoline launch scenario

The visibility of the trampoline activity is not set correctly,
causing the trampoline activity to be incorrectly collected
and resulted in transition timeout.

Bug: 414676507
Test: atest ActivityRecordTests
Flag: EXEMPT bugfix
Change-Id: I6e71e76e06b07b087fd32a6180d640feded2599e
parent 3f3b78ce
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -3655,7 +3655,10 @@ final class ActivityRecord extends WindowToken {
            }

            finishActivityResults(resultCode, resultData, resultGrants);

            final boolean wasVisibleRequested = mVisibleRequested;
            if (mVisibleRequested) {
                setVisibility(false);
            }
            if (isState(RESUMED)) {
                if (endTask) {
                    mAtmService.getTaskChangeNotificationController().notifyTaskRemovalStarted(
@@ -3669,8 +3672,6 @@ final class ActivityRecord extends WindowToken {
                    Slog.v(TAG_TRANSITION, "Prepare close transition: finishing " + this);
                }

                // Tell window manager to prepare for this one to be removed.
                setVisibility(false);
                // Propagate the last IME visibility in the same task, so the IME can show
                // automatically if the next activity has a focused editable view.
                if (mLastImeShown) {
@@ -3693,10 +3694,9 @@ final class ActivityRecord extends WindowToken {
                    mAtmService.getLockTaskController().clearLockedTask(task);
                }
            } else if (!isState(PAUSING)) {
                if (mVisibleRequested) {
                if (wasVisibleRequested) {
                    // Prepare and execute close transition.
                    if (mTransitionController.isShellTransitionsEnabled()) {
                        setVisibility(false);
                        if (newTransition != null) {
                            // This is a transition specifically for this close operation, so set
                            // ready now.