From a6ff530c3507235f31b272c28d40d96f23670f07 Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Fri, 3 Dec 2021 10:42:41 +0800 Subject: [PATCH] Fixes rotation stuck in core without trigger transition. If there exists a Open transition for an app and display was involved, update rotation will not start any rotation neither startRemoteRotation or requestTransition because there will add the display to sync group, and since there never send any rotation-related signal to shell, the display will never sync ready because the system decorations won't know there should be an configuration change. There should check isCollecting so it can fallback to startRemoteRotation. Test: enable shell transition, run atest TaplTestsLauncher3 Bug: 207297486 Change-Id: Ic710c44a158c3522a0b3e5cbee7d6b1a4c7e4bda --- services/core/java/com/android/server/wm/DisplayRotation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayRotation.java b/services/core/java/com/android/server/wm/DisplayRotation.java index 427bbeb78fb03..024fe3602616e 100644 --- a/services/core/java/com/android/server/wm/DisplayRotation.java +++ b/services/core/java/com/android/server/wm/DisplayRotation.java @@ -508,10 +508,10 @@ public class DisplayRotation { mDisplayContent.setLayoutNeeded(); if (useShellTransitions) { - final boolean wasInTransition = mDisplayContent.inTransition(); + final boolean wasCollecting = mDisplayContent.mTransitionController.isCollecting(); mDisplayContent.requestChangeTransitionIfNeeded( ActivityInfo.CONFIG_WINDOW_CONFIGURATION); - if (wasInTransition) { + if (wasCollecting) { // Use remote-rotation infra since the transition has already been requested // TODO(shell-transitions): Remove this once lifecycle management can cover all // rotation cases.