Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +9 −1 Original line number Diff line number Diff line Loading @@ -107,6 +107,13 @@ class NotificationShadeDepthController @Inject constructor( else 0) } var qsPanelExpansion = 0f set(value) { if (field == value) return field = value scheduleUpdate() } /** * When launching an app from the shade, the animations progress should affect how blurry the * shade is, overriding the expansion amount. Loading Loading @@ -158,8 +165,9 @@ class NotificationShadeDepthController @Inject constructor( updateScheduled = false val normalizedBlurRadius = MathUtils.constrain(shadeAnimation.radius, blurUtils.minBlurRadius, blurUtils.maxBlurRadius) val combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION + var combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION + normalizedBlurRadius * ANIMATION_BLUR_FRACTION).toInt() combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsPanelExpansion)) var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat() shadeRadius *= 1f - brightnessMirrorSpring.ratio val launchProgress = notificationLaunchAnimationParams?.linearProgress ?: 0f Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +5 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ import com.android.systemui.statusbar.GestureRecorder; import com.android.systemui.statusbar.KeyguardAffordanceView; import com.android.systemui.statusbar.KeyguardIndicationController; import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShelfController; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.RemoteInputController; Loading Loading @@ -481,6 +482,7 @@ public class NotificationPanelViewController extends PanelViewController { private final UserManager mUserManager; private final ShadeController mShadeController; private final MediaDataManager mMediaDataManager; private NotificationShadeDepthController mDepthController; private int mDisplayId; /** Loading Loading @@ -580,6 +582,7 @@ public class NotificationPanelViewController extends PanelViewController { ScrimController scrimController, UserManager userManager, MediaDataManager mediaDataManager, NotificationShadeDepthController notificationShadeDepthController, AmbientState ambientState, FeatureFlags featureFlags) { super(view, falsingManager, dozeLog, keyguardStateController, Loading @@ -598,6 +601,7 @@ public class NotificationPanelViewController extends PanelViewController { mNotificationIconAreaController = notificationIconAreaController; mKeyguardStatusViewComponentFactory = keyguardStatusViewComponentFactory; mKeyguardStatusBarViewComponentFactory = keyguardStatusBarViewComponentFactory; mDepthController = notificationShadeDepthController; mFeatureFlags = featureFlags; mKeyguardQsUserSwitchComponentFactory = keyguardQsUserSwitchComponentFactory; mKeyguardUserSwitcherComponentFactory = keyguardUserSwitcherComponentFactory; Loading Loading @@ -1997,6 +2001,7 @@ public class NotificationPanelViewController extends PanelViewController { mMediaHierarchyManager.setQsExpansion(qsExpansionFraction); mScrimController.setQsExpansion(qsExpansionFraction); mNotificationStackScrollLayoutController.setQsExpansionFraction(qsExpansionFraction); mDepthController.setQsPanelExpansion(qsExpansionFraction); } private String determineAccessibilityPaneTitle() { Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,13 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { verify(shadeAnimation).animateTo(eq(0), any()) } @Test fun setQsPanelExpansion_appliesBlur() { notificationShadeDepthController.qsPanelExpansion = 1f notificationShadeDepthController.updateBlurCallback.doFrame(0) verify(blurUtils).applyBlur(any(), eq(maxBlur)) } @Test fun updateGlobalDialogVisibility_animatesBlur() { notificationShadeDepthController.updateGlobalDialogVisibility(0.5f, root) Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.KeyguardAffordanceView; import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShelfController; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.StatusBarStateControllerImpl; Loading Loading @@ -219,6 +220,8 @@ public class NotificationPanelViewTest extends SysuiTestCase { @Mock private NotificationStackScrollLayoutController mNotificationStackScrollLayoutController; @Mock private NotificationShadeDepthController mNotificationShadeDepthController; @Mock private AuthController mAuthController; @Mock private ScrimController mScrimController; Loading Loading @@ -333,6 +336,7 @@ public class NotificationPanelViewTest extends SysuiTestCase { mScrimController, mUserManager, mMediaDataManager, mNotificationShadeDepthController, mAmbientState, mFeatureFlags); mNotificationPanelViewController.initDependencies( Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +9 −1 Original line number Diff line number Diff line Loading @@ -107,6 +107,13 @@ class NotificationShadeDepthController @Inject constructor( else 0) } var qsPanelExpansion = 0f set(value) { if (field == value) return field = value scheduleUpdate() } /** * When launching an app from the shade, the animations progress should affect how blurry the * shade is, overriding the expansion amount. Loading Loading @@ -158,8 +165,9 @@ class NotificationShadeDepthController @Inject constructor( updateScheduled = false val normalizedBlurRadius = MathUtils.constrain(shadeAnimation.radius, blurUtils.minBlurRadius, blurUtils.maxBlurRadius) val combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION + var combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION + normalizedBlurRadius * ANIMATION_BLUR_FRACTION).toInt() combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsPanelExpansion)) var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat() shadeRadius *= 1f - brightnessMirrorSpring.ratio val launchProgress = notificationLaunchAnimationParams?.linearProgress ?: 0f Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +5 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ import com.android.systemui.statusbar.GestureRecorder; import com.android.systemui.statusbar.KeyguardAffordanceView; import com.android.systemui.statusbar.KeyguardIndicationController; import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShelfController; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.RemoteInputController; Loading Loading @@ -481,6 +482,7 @@ public class NotificationPanelViewController extends PanelViewController { private final UserManager mUserManager; private final ShadeController mShadeController; private final MediaDataManager mMediaDataManager; private NotificationShadeDepthController mDepthController; private int mDisplayId; /** Loading Loading @@ -580,6 +582,7 @@ public class NotificationPanelViewController extends PanelViewController { ScrimController scrimController, UserManager userManager, MediaDataManager mediaDataManager, NotificationShadeDepthController notificationShadeDepthController, AmbientState ambientState, FeatureFlags featureFlags) { super(view, falsingManager, dozeLog, keyguardStateController, Loading @@ -598,6 +601,7 @@ public class NotificationPanelViewController extends PanelViewController { mNotificationIconAreaController = notificationIconAreaController; mKeyguardStatusViewComponentFactory = keyguardStatusViewComponentFactory; mKeyguardStatusBarViewComponentFactory = keyguardStatusBarViewComponentFactory; mDepthController = notificationShadeDepthController; mFeatureFlags = featureFlags; mKeyguardQsUserSwitchComponentFactory = keyguardQsUserSwitchComponentFactory; mKeyguardUserSwitcherComponentFactory = keyguardUserSwitcherComponentFactory; Loading Loading @@ -1997,6 +2001,7 @@ public class NotificationPanelViewController extends PanelViewController { mMediaHierarchyManager.setQsExpansion(qsExpansionFraction); mScrimController.setQsExpansion(qsExpansionFraction); mNotificationStackScrollLayoutController.setQsExpansionFraction(qsExpansionFraction); mDepthController.setQsPanelExpansion(qsExpansionFraction); } private String determineAccessibilityPaneTitle() { Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +7 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,13 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { verify(shadeAnimation).animateTo(eq(0), any()) } @Test fun setQsPanelExpansion_appliesBlur() { notificationShadeDepthController.qsPanelExpansion = 1f notificationShadeDepthController.updateBlurCallback.doFrame(0) verify(blurUtils).applyBlur(any(), eq(maxBlur)) } @Test fun updateGlobalDialogVisibility_animatesBlur() { notificationShadeDepthController.updateGlobalDialogVisibility(0.5f, root) Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.KeyguardAffordanceView; import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShelfController; import com.android.systemui.statusbar.PulseExpansionHandler; import com.android.systemui.statusbar.StatusBarStateControllerImpl; Loading Loading @@ -219,6 +220,8 @@ public class NotificationPanelViewTest extends SysuiTestCase { @Mock private NotificationStackScrollLayoutController mNotificationStackScrollLayoutController; @Mock private NotificationShadeDepthController mNotificationShadeDepthController; @Mock private AuthController mAuthController; @Mock private ScrimController mScrimController; Loading Loading @@ -333,6 +336,7 @@ public class NotificationPanelViewTest extends SysuiTestCase { mScrimController, mUserManager, mMediaDataManager, mNotificationShadeDepthController, mAmbientState, mFeatureFlags); mNotificationPanelViewController.initDependencies( Loading