AOD: Use keyguard screen rotation when dozing

AOD might show even before the keyguard engages. We should still
use the keyguard's screen rotation in that case, instead of the
underlying app's.

Change-Id: I7d69eb11c20e300fbe2565ce10b4c502f14fbdf6
Fixes: 38309993
Test: Enable autorotate, open an app that does not fix rotation, let display timeout, verify always-on display shows in portrait
This commit is contained in:
Adrian Roos
2017-06-28 19:37:24 +02:00
parent 68e459918a
commit 8206944f26

View File

@@ -138,7 +138,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D
}
private void adjustScreenOrientation(State state) {
if (state.isKeyguardShowingAndNotOccluded()) {
if (state.isKeyguardShowingAndNotOccluded() || state.dozing) {
if (mKeyguardScreenRotation) {
mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER;
} else {