diff options
| author | 2024-07-04 00:25:11 +0000 | |
|---|---|---|
| committer | 2024-07-04 00:25:11 +0000 | |
| commit | 9db2f2407682ba255aa08df713bf3d256bc5cf7c (patch) | |
| tree | 3179e6bdc046efe614f7fa1325b9995b3127cb97 | |
| parent | d31c2d0b1b82fca9ade1ab12f24d439d53b3b67c (diff) | |
| parent | b0a42d9c28fe820cf858db025e700c932a41571e (diff) | |
Merge "Fix windowless snapshot surface drawing with mismatch configuration." into main
| -rw-r--r-- | services/core/java/com/android/server/wm/BackNavigationController.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java index d45ed12e5ef6..14e256f7a815 100644 --- a/services/core/java/com/android/server/wm/BackNavigationController.java +++ b/services/core/java/com/android/server/wm/BackNavigationController.java @@ -1335,12 +1335,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 |