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

Commit b0a42d9c authored by wilsonshih's avatar wilsonshih
Browse files

Fix windowless snapshot surface drawing with mismatch configuration.

For close task animation, there should attach the windowless surface to
the task, instead of activity. Because previous activity could inside
an adjacent task fragment.

Bug: 274997067
Flag: EXEMPT bugfix
Test: launch task from an adjacent embedded activity. Trigger back
gesture and verify the windowless surface should cover entire task.

Change-Id: I465b676fcb5daede45b21bba2ac30a900523ac20
parent 4cee69ff
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1336,12 +1336,16 @@ class BackNavigationController {
                }
                // If there is only one adaptor, attach the windowless window to top activity,
                // because fixed rotation only applies on activity.
                // Note that embedded activity won't use fixed rotation.
                final Configuration openConfig = mAdaptors.length == 1
                // Note that embedded activity won't use fixed rotation. Also, there is only one
                // animation target for closing task.
                final boolean chooseActivity = mAdaptors.length == 1
                        && (switchType == ACTIVITY_SWITCH || mainActivity.mDisplayContent
                                .isFixedRotationLaunchingApp(mainActivity));
                final Configuration openConfig = chooseActivity
                        ? mainActivity.getConfiguration() : openTask.getConfiguration();
                mRequestedStartingSurfaceId = openTask.mAtmService.mTaskOrganizerController
                        .addWindowlessStartingSurface(openTask, mainActivity,
                                mAdaptors.length == 1 ? mainActivity.getSurfaceControl()
                                chooseActivity ? mainActivity.getSurfaceControl()
                                        : mRemoteAnimationTarget.leash, snapshot, openConfig,
                            new IWindowlessStartingSurfaceCallback.Stub() {
                            // Once the starting surface has been created in shell, it will call