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

Commit 49a9b027 authored by wilsonshih's avatar wilsonshih Committed by Wei Sheng Shih
Browse files

Always choose starting window's sync transaction to reparent.

The order of finishSync target can affects the final result of
reparent starting window. That's because there use starting
window's sync transaction for transfer starting window, but choose
activity's sync transaction for attach starting surface to
associatedTask. So if transfer starting window happen after
attachStartingSurfaceToAssociatedTask, and the activity's finishSync
occur before window's finishSync, then the final transaction result
will be transfer starting window.

Flag: EXEMPT bugfix
Bug: 349020524
Test: repeat launch app info from launcher multiple times. Also verify
there is regression on 26327083

Change-Id: Ia21930051a132bf87e54f09d52abbd36a87bd0aa
parent 9db2f240
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -2917,14 +2917,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    /** Makes starting window always fill the associated task. */
    private void attachStartingSurfaceToAssociatedTask() {
        if (mSyncState == SYNC_STATE_NONE && isEmbedded()) {
            // Collect this activity since it's starting window will reparent to task. To ensure
            // any starting window's transaction will occur in order.
            mTransitionController.collect(this);
        }
        mTransitionController.collect(mStartingWindow);
        // Associate the configuration of starting window with the task.
        overrideConfigurationPropagation(mStartingWindow, mStartingData.mAssociatedTask);
        getSyncTransaction().reparent(mStartingWindow.mSurfaceControl,
        mStartingWindow.getSyncTransaction().reparent(mStartingWindow.mSurfaceControl,
                mStartingData.mAssociatedTask.mSurfaceControl);
    }