From dc1b9d58a7f5522fb1c5b7155b52c733b9f5080d Mon Sep 17 00:00:00 2001 From: Andy CrossGate Yan Date: Sun, 21 Jan 2024 22:03:47 +0800 Subject: [PATCH 03/31] Keyguard: Allow locking to any rotation mode Change-Id: I0f12c433f3547e9bfcdbc2cf50e2a4f3ec8ca311 --- .../shade/NotificationShadeWindowControllerImpl.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java index 2ebe2bcf7099..6e51746c6ea7 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java @@ -382,12 +382,9 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW } private void adjustScreenOrientation(NotificationShadeWindowState state) { - if (state.bouncerShowing || state.isKeyguardShowingAndNotOccluded() || state.dozing) { - if (shouldEnableKeyguardScreenRotation()) { - mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER; - } else { - mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR; - } + if ((state.bouncerShowing || state.isKeyguardShowingAndNotOccluded() || state.dozing) + && shouldEnableKeyguardScreenRotation()) { + mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER; } else { mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; } -- 2.34.1