From 7ee09c4b5512ca2c3c031f07eb10e2c78bc9b004 Mon Sep 17 00:00:00 2001 From: Ming-Shin Lu Date: Mon, 30 May 2022 03:58:30 +0000 Subject: [PATCH] Fix snapshot starting window isn't apply fixed-rotation with IME visible As IME window will be hidden by AsyncFadeAnimationController when receiving IME show request in IMMS side during fixed-rotation. we could remove the previous logic from CL[1] in case snapshot starting window surface may not apply fixed-rotation when IME snapshot visible in the first place, since in CL[2] has already removed the disable fixed-rotation when animating snapshot starting window with IME visible. [1]: Idfdf129adbfbee6634d8a27aa78da1f631bd213b [2]: Iceaedbfdb75e68e9f7fb8fd4a1bf8f35a779797e Bug: 230733128 Test: 1. Launch a portrait app which keeps showing IME. (e.g. Chrome) 2. Return to home be home key or swiping. 3. Hold the device in landscape. 4. Launch the app again. The app should show in landscape directly and IME will fade-in when it is drawn in landscape. Change-Id: Ieb656aaa9f76d0f5dcc5487a6602e528ec771552 --- .../java/com/android/server/wm/StartingSurfaceController.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/wm/StartingSurfaceController.java b/services/core/java/com/android/server/wm/StartingSurfaceController.java index ccd018faf075d..e8445ab8c35e2 100644 --- a/services/core/java/com/android/server/wm/StartingSurfaceController.java +++ b/services/core/java/com/android/server/wm/StartingSurfaceController.java @@ -159,9 +159,7 @@ public class StartingSurfaceController { return null; } if (topFullscreenActivity.getWindowConfiguration().getRotation() - != taskSnapshot.getRotation() - // Use normal rotation to avoid flickering of IME window in old orientation. - && !taskSnapshot.hasImeSurface()) { + != taskSnapshot.getRotation()) { // The snapshot should have been checked by ActivityRecord#isSnapshotCompatible // that the activity will be updated to the same rotation as the snapshot. Since // the transition is not started yet, fixed rotation transform needs to be applied