diff options
| author | 2022-03-05 01:49:50 +0000 | |
|---|---|---|
| committer | 2022-03-05 01:49:50 +0000 | |
| commit | 5c62dd44b9554dd2ac1f13c6101e414a5d456ffc (patch) | |
| tree | 87c2ca2c9f6f3019ffe4f9a445d4af338021d87e | |
| parent | 1bdc8afc0ce35bee73ae65b8f7473f25b6187a38 (diff) | |
Revert "Scrim was flickering on FPS unlock"
Revert submission 17073604-presubmit-am-787ed0a55f5040968a8a9c14764ddd01
Reason for revert: cause of b/222711091
Reverted Changes:
I3aae23a57:Remove temp user creation activity
I6b2ce8e01:Scrim was flickering on FPS unlock
Change-Id: Ie8f02829b9bc9bdd533343d6011e352a00d26776
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java | 10 | ||||
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesTest.java | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java index 95a465989299..84adc5679a81 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java @@ -663,6 +663,7 @@ public class CentralSurfaces extends CoreStartable implements protected final BatteryController mBatteryController; protected boolean mPanelExpanded; private UiModeManager mUiModeManager; + protected boolean mIsKeyguard; private LogMaker mStatusBarStateLog; protected final NotificationIconAreaController mNotificationIconAreaController; @Nullable private View mAmbientIndicationContainer; @@ -1141,7 +1142,7 @@ public class CentralSurfaces extends CoreStartable implements } if (leaveOpen) { mStatusBarStateController.setLeaveOpenOnKeyguardHide(true); - if (mKeyguardStateController.isShowing()) { + if (mIsKeyguard) { // When device state changes on keyguard we don't want to keep the state of // the shade and instead we open clean state of keyguard with shade closed. // Normally some parts of QS state (like expanded/collapsed) are persisted and @@ -2889,8 +2890,7 @@ public class CentralSurfaces extends CoreStartable implements // late in the transition, so we also allow the device to start dozing once the screen has // turned off fully. boolean keyguardForDozing = mDozeServiceHost.getDozingRequested() - && (!mDeviceInteractive || (isGoingToSleep() - && (isScreenFullyOff() || mKeyguardStateController.isShowing()))); + && (!mDeviceInteractive || isGoingToSleep() && (isScreenFullyOff() || mIsKeyguard)); boolean isWakingAndOccluded = isOccluded() && isWaking(); boolean shouldBeKeyguard = (mStatusBarStateController.isKeyguardRequested() || keyguardForDozing) && !wakeAndUnlocking && !isWakingAndOccluded; @@ -2923,6 +2923,7 @@ public class CentralSurfaces extends CoreStartable implements public void showKeyguardImpl() { Trace.beginSection("CentralSurfaces#showKeyguard"); + mIsKeyguard = true; // In case we're locking while a smartspace transition is in progress, reset it. mKeyguardUnlockAnimationController.resetSmartspaceTransition(); if (mKeyguardStateController.isLaunchTransitionFadingAway()) { @@ -3043,6 +3044,7 @@ public class CentralSurfaces extends CoreStartable implements * @return true if we would like to stay in the shade, false if it should go away entirely */ public boolean hideKeyguardImpl(boolean forceStateChange) { + mIsKeyguard = false; Trace.beginSection("CentralSurfaces#hideKeyguard"); boolean staying = mStatusBarStateController.leaveOpenOnKeyguardHide(); int previousState = mStatusBarStateController.getState(); @@ -3769,7 +3771,7 @@ public class CentralSurfaces extends CoreStartable implements }); } else if (mDozing && !unlocking) { mScrimController.transitionTo(ScrimState.AOD); - } else if (mKeyguardStateController.isShowing() && !unlocking) { + } else if (mIsKeyguard && !unlocking) { mScrimController.transitionTo(ScrimState.KEYGUARD); } else { mScrimController.transitionTo(ScrimState.UNLOCKED, mUnlockScrimCallback); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesTest.java index 3810783d4f76..953a330d2e65 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesTest.java @@ -846,7 +846,6 @@ public class CentralSurfacesTest extends SysuiTestCase { @Test public void testTransitionLaunch_noPreview_doesntGoUnlocked() { mCentralSurfaces.setBarStateForTest(StatusBarState.KEYGUARD); - when(mKeyguardStateController.isShowing()).thenReturn(true); mCentralSurfaces.showKeyguardImpl(); // Starting a pulse should change the scrim controller to the pulsing state @@ -869,7 +868,6 @@ public class CentralSurfacesTest extends SysuiTestCase { @Test public void testPulseWhileDozing_updatesScrimController() { mCentralSurfaces.setBarStateForTest(StatusBarState.KEYGUARD); - when(mKeyguardStateController.isShowing()).thenReturn(true); mCentralSurfaces.showKeyguardImpl(); // Starting a pulse should change the scrim controller to the pulsing state |