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

Commit 07a47241 authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

[PiP2] Use BLAST sync method for config-at-end

If a config-at-end activity already has a sync group,
make sure all windows of that activity have their mSyncMethodOverride
set to METHOD_BLAST.

So if the collecting transition, for instance, isn't using BLAST sync
method, we can still count on the config-at-end activity's window's draw
being applied in sync as a part of the syncTransaction (which also
resets the ActivityRecord transform).

Bug: 397766262
Flag: com.android.wm.shell.enable_pip2
Test: swipe PiP to home from landscape mode
Change-Id: I79f253136c75b39e48b7234ab0ae0f50ab09c8c8
parent bbf788a7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1640,6 +1640,12 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
                    mSyncEngine.setSyncMethod(syncId, BLASTSyncEngine.METHOD_BLAST);
                }
                mSyncEngine.addToSyncSet(syncId, target);
            } else {
                // If there is an existing sync group for the commit-at-end activity,
                // enforce BLAST sync method for its windows, before resuming config dispatch.
                target.forAllWindows(windowState -> {
                    windowState.mSyncMethodOverride = BLASTSyncEngine.METHOD_BLAST;
                }, true /* traverseTopToBottom */);
            }
            // Reset surface state here (since it was skipped in buildFinishTransaction). Since
            // we are resuming config to the "current" state, we have to calculate the matching