summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wei Sheng Shih <wilsonshih@google.com> 2024-07-04 00:25:11 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-07-04 00:25:11 +0000
commit9db2f2407682ba255aa08df713bf3d256bc5cf7c (patch)
tree3179e6bdc046efe614f7fa1325b9995b3127cb97
parentd31c2d0b1b82fca9ade1ab12f24d439d53b3b67c (diff)
parentb0a42d9c28fe820cf858db025e700c932a41571e (diff)
Merge "Fix windowless snapshot surface drawing with mismatch configuration." into main
-rw-r--r--services/core/java/com/android/server/wm/BackNavigationController.java10
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