From 8782caa6d8ddbfb291384b7717787fc0f836a351 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Wed, 23 Mar 2022 19:36:42 +0000 Subject: [PATCH] Scrim: Do not interact with scrim with hint When hint animation is running, we want to disable scrim logic. Bug: 226403870 Test: Manual on device Change-Id: Ibf12fce8ab167a641d1089e4bce7163ca66d5a51 --- .../statusbar/phone/NotificationPanelViewController.java | 2 ++ .../phone/NotificationPanelViewControllerTest.java | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index ebdd257a9fc5..371a47f1f8ce 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -3203,12 +3203,14 @@ public class NotificationPanelViewController extends PanelViewController { @Override protected void onUnlockHintFinished() { super.onUnlockHintFinished(); + mScrimController.setExpansionAffectsAlpha(true); mNotificationStackScrollLayoutController.setUnlockHintRunning(false); } @Override protected void onUnlockHintStarted() { super.onUnlockHintStarted(); + mScrimController.setExpansionAffectsAlpha(false); mNotificationStackScrollLayoutController.setUnlockHintRunning(true); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java index 21d03adb64ef..5add2f2a5148 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java @@ -930,6 +930,14 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { verify(mLargeScreenShadeHeaderController).setActive(false); } + @Test + public void testUnlockAnimationDoesNotAffectScrim() { + mNotificationPanelViewController.onUnlockHintStarted(); + verify(mScrimController).setExpansionAffectsAlpha(false); + mNotificationPanelViewController.onUnlockHintFinished(); + verify(mScrimController).setExpansionAffectsAlpha(true); + } + private void triggerPositionClockAndNotifications() { mNotificationPanelViewController.closeQs(); }