lineage_patches_unified/patches_platform/frameworks_base/0003-Keyguard-Allow-locking-to-any-rotation-mode.patch
2024-04-21 16:33:07 +08:00

34 lines
1.7 KiB
Diff

From e492a141400c534bfc1f08b904e7e7f60e92164e Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sun, 21 Jan 2024 22:03:47 +0800
Subject: [PATCH 03/34] 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 b4082694bbe5..f9f3dd911a74 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
@@ -431,12 +431,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