summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Aaron Liu <aaronjli@google.com> 2022-03-24 17:15:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-03-24 17:15:32 +0000
commitd1700b3355a70d9d0aef3eb75219c01ea97fb0e2 (patch)
tree4f68207af00db52388bfe3f54c864791b368738b
parent95387ac862c4c4f4a0eae942cdd95120cf1ebba6 (diff)
parent8782caa6d8ddbfb291384b7717787fc0f836a351 (diff)
Merge "Scrim: Do not interact with scrim with hint" into tm-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java8
2 files changed, 10 insertions, 0 deletions
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 7882fffe6b4c..999ebc11b621 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
@@ -3210,12 +3210,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();
}