summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Beverly <beverlyt@google.com> 2022-02-14 19:44:27 +0000
committer Beverly Tai <beverlyt@google.com> 2022-02-16 13:16:48 +0000
commit39b44844ac7d6ddb21328a0b58445280ea510d6d (patch)
tree173b2815e6ef05b00b05aec261ca8bff565d618e
parent91d578198091f41f928b5a6c844d521fc6bb3696 (diff)
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java13
2 files changed, 14 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
index b312ce20b313..8366bddaab9f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
@@ -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(
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index f13334e55555..ede00a0de076 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -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);