Use AUTH_SCRIMMED_SHADE if transitioning to shade

Since the end scrim state should be SHADE, we want
to make sure the notification scrim doesn't
suddenly become transparent.

Test: atest SystemUITests
Test: manually test with sensitive notifications
not allowed to show on LS, pull down notification
shade with UDFPS enrolled
Fixes: 213158348

Change-Id: I367e5769edd82f9f5651d7522bdbfacbe7967786
This commit is contained in:
Beverly
2022-02-14 19:44:27 +00:00
committed by Beverly Tai
parent 91d5781980
commit 39b44844ac
2 changed files with 14 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ class LockscreenShadeTransitionController @Inject constructor(
wakefulnessLifecycle: WakefulnessLifecycle,
configurationController: ConfigurationController,
falsingManager: FalsingManager,
dumpManager: DumpManager,
dumpManager: DumpManager
) : Dumpable {
private var pulseHeight: Float = 0f
private var useSplitShade: Boolean = false
@@ -363,6 +363,7 @@ class LockscreenShadeTransitionController @Inject constructor(
notificationPanelController.setKeyguardOnlyContentAlpha(1.0f - scrimProgress)
depthController.transitionToFullShadeProgress = scrimProgress
udfpsKeyguardViewController?.setTransitionToFullShadeProgress(scrimProgress)
statusbar.setTransitionToFullShadeProgress(scrimProgress)
}
private fun setDragDownAmountAnimated(

View File

@@ -343,6 +343,7 @@ public class StatusBar extends CoreStartable implements
private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
private final DreamOverlayStateController mDreamOverlayStateController;
private StatusBarCommandQueueCallbacks mCommandQueueCallbacks;
private float mTransitionToFullShadeProgress = 0f;
void onStatusBarWindowStateChanged(@WindowVisibleState int state) {
updateBubblesVisibility();
@@ -3774,6 +3775,15 @@ public class StatusBar extends CoreStartable implements
updateScrimController();
}
/**
* Set the amount of progress we are currently in if we're transitioning to the full shade.
* 0.0f means we're not transitioning yet, while 1 means we're all the way in the full
* shade.
*/
public void setTransitionToFullShadeProgress(float transitionToFullShadeProgress) {
mTransitionToFullShadeProgress = transitionToFullShadeProgress;
}
@VisibleForTesting
public void updateScrimController() {
Trace.beginSection("StatusBar#updateScrimController");
@@ -3792,7 +3802,8 @@ public class StatusBar extends CoreStartable implements
mScrimController.setLaunchingAffordanceWithPreview(launchingAffordanceWithPreview);
if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) {
if (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED) {
if (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED
|| mTransitionToFullShadeProgress > 0f) {
mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED_SHADE);
} else {
mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED);