Merge "Read isKeyguardScreenRotationAllowed each time instead of caching" into sc-v2-dev am: f1edea6716 am: cf79a70c66
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15502272 Change-Id: Ie459d9e4358f157ef09b6fd22da9178d4b8c1923
This commit is contained in:
@@ -84,8 +84,8 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
|
||||
private final WindowManager mWindowManager;
|
||||
private final IActivityManager mActivityManager;
|
||||
private final DozeParameters mDozeParameters;
|
||||
private final KeyguardStateController mKeyguardStateController;
|
||||
private final LayoutParams mLpChanged;
|
||||
private final boolean mKeyguardScreenRotation;
|
||||
private final long mLockScreenDisplayTimeout;
|
||||
private final float mKeyguardPreferredRefreshRate; // takes precedence over max
|
||||
private final float mKeyguardMaxRefreshRate;
|
||||
@@ -123,8 +123,8 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
|
||||
mContext = context;
|
||||
mWindowManager = windowManager;
|
||||
mActivityManager = activityManager;
|
||||
mKeyguardScreenRotation = keyguardStateController.isKeyguardScreenRotationAllowed();
|
||||
mDozeParameters = dozeParameters;
|
||||
mKeyguardStateController = keyguardStateController;
|
||||
mScreenBrightnessDoze = mDozeParameters.getScreenBrightnessDoze();
|
||||
mLpChanged = new LayoutParams();
|
||||
mKeyguardViewMediator = keyguardViewMediator;
|
||||
@@ -323,7 +323,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
|
||||
|
||||
private void adjustScreenOrientation(State state) {
|
||||
if (state.isKeyguardShowingAndNotOccluded() || state.mDozing) {
|
||||
if (mKeyguardScreenRotation) {
|
||||
if (mKeyguardStateController.isKeyguardScreenRotationAllowed()) {
|
||||
mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_USER;
|
||||
} else {
|
||||
mLpChanged.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
|
||||
|
||||
Reference in New Issue
Block a user