From 3162b8f7e999705bf09920974cf6e369b51bc5fe Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Tue, 25 Jul 2017 15:37:32 +0200 Subject: AOD: Fix rotation during screen off (again) Fixes another issue where the screen could rotate during the screen-off transition. mAwake is still true during goingToSleep, but we should no longer play rotation animations if we are going to sleep. Instead use the more appropriately named okToAnimate. Change-Id: I816d1552de3fea0a19ce42ca50d845eb46f80625 Fixes: 63760853 Test: Trigger show-when-locked navigation, rotate phone to landscape, trigger assistant, go to sleep. Verify no rotation plays; go/wm-smoke --- services/core/java/com/android/server/policy/PhoneWindowManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 7a41e8a50ace..e89ab1de7b65 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -3164,7 +3164,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void selectRotationAnimationLw(int anim[]) { // If the screen is off or non-interactive, force a jumpcut. - final boolean forceJumpcut = !mScreenOnFully || !mAwake; + final boolean forceJumpcut = !mScreenOnFully || !okToAnimate(); if (PRINT_ANIM) Slog.i(TAG, "selectRotationAnimation mTopFullscreen=" + mTopFullscreenOpaqueWindowState + " rotationAnimation=" + (mTopFullscreenOpaqueWindowState == null ? -- cgit v1.2.3-59-g8ed1b