diff options
author | Beverly <beverlyt@google.com> | 2021-08-23 18:01:29 -0400 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-25 02:36:46 +0000 |
commit | af7be16f7dc782ac011141f32204aa78690d7eb2 (patch) | |
tree | 0b94abc604dc396adee99c5fd677c8967e79c424 | |
parent | ca5c198e6e5543683bca02bf21711a55b057a83d (diff) | |
download | base-af7be16f7dc782ac011141f32204aa78690d7eb2.tar.gz |
On keyguard unoccluding, set notif scrim alpha to KEYGUARD_SCRIM_ALPHA
We still want the keyguard notification scrim after
the unoccluding transition.
Test: manual, atest ScrimControllerTest
Bug: 197160246
Change-Id: I210ba3491eb98c30bec121c6119f6dfb1d6aeba7
(cherry picked from commit 7ec73696bde41235a76844c97a5e115c434110be)
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java | 3 | ||||
-rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index 2ae59f12b25c..7d25aeef6f98 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -711,7 +711,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } if (mUnOcclusionAnimationRunning && mState == ScrimState.KEYGUARD) { // We're unoccluding the keyguard and don't want to have a bright flash. - mNotificationsAlpha = 0f; + mNotificationsAlpha = KEYGUARD_SCRIM_ALPHA; + mNotificationsTint = ScrimState.KEYGUARD.getNotifTint(); } } if (isNaN(mBehindAlpha) || isNaN(mInFrontAlpha) || isNaN(mNotificationsAlpha)) { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java index 1b2d5cdcbf0d..c71318fa9464 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.phone; +import static com.android.systemui.statusbar.phone.ScrimController.KEYGUARD_SCRIM_ALPHA; import static com.android.systemui.statusbar.phone.ScrimController.OPAQUE; import static com.android.systemui.statusbar.phone.ScrimController.SEMI_TRANSPARENT; import static com.android.systemui.statusbar.phone.ScrimController.TRANSPARENT; @@ -1186,8 +1187,10 @@ public class ScrimControllerTest extends SysuiTestCase { mScrimController.transitionTo(ScrimState.KEYGUARD); mScrimController.setUnocclusionAnimationRunning(true); - assertAlphaAfterExpansion(mNotificationsScrim, /* alpha */ 0.0f, /* expansion */ 0.0f); - assertAlphaAfterExpansion(mNotificationsScrim, /* alpha */ 0.0f, /* expansion */ 1.0f); + assertAlphaAfterExpansion(mNotificationsScrim, /* alpha */ KEYGUARD_SCRIM_ALPHA, + /* expansion */ 0.0f); + assertAlphaAfterExpansion(mNotificationsScrim, /* alpha */ KEYGUARD_SCRIM_ALPHA, + /* expansion */ 1.0f); // Verify normal behavior after mScrimController.setUnocclusionAnimationRunning(false); |