diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt index 2a468938ecfff..e8ce5f952b3bd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt @@ -98,15 +98,6 @@ class NotificationShadeDepthController @Inject constructor( var globalActionsSpring = DepthAnimation() var showingHomeControls: Boolean = false - @VisibleForTesting - var brightnessMirrorSpring = DepthAnimation() - var brightnessMirrorVisible: Boolean = false - set(value) { - field = value - brightnessMirrorSpring.animateTo(if (value) blurUtils.blurRadiusOfRatio(1f) - else 0) - } - var qsPanelExpansion = 0f set(value) { if (field == value) return @@ -169,7 +160,6 @@ class NotificationShadeDepthController @Inject constructor( 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 shadeRadius *= (1f - launchProgress) * (1f - launchProgress) @@ -263,7 +253,6 @@ class NotificationShadeDepthController @Inject constructor( shadeSpring.finishIfRunning() shadeAnimation.finishIfRunning() globalActionsSpring.finishIfRunning() - brightnessMirrorSpring.finishIfRunning() } } @@ -425,7 +414,6 @@ class NotificationShadeDepthController @Inject constructor( it.println("shadeRadius: ${shadeSpring.radius}") it.println("shadeAnimation: ${shadeAnimation.radius}") it.println("globalActionsRadius: ${globalActionsSpring.radius}") - it.println("brightnessMirrorRadius: ${brightnessMirrorSpring.radius}") it.println("wakeAndUnlockBlur: $wakeAndUnlockBlurRadius") it.println("notificationLaunchAnimationProgress: " + "${notificationLaunchAnimationParams?.linearProgress}") diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java index a0edc7c494bc4..399c8500ab485 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java @@ -74,13 +74,11 @@ public class BrightnessMirrorController mBrightnessMirror.setVisibility(View.VISIBLE); mVisibilityCallback.accept(true); mNotificationPanel.setPanelAlpha(0, true /* animate */); - mDepthController.setBrightnessMirrorVisible(true); } public void hideMirror() { mVisibilityCallback.accept(false); mNotificationPanel.setPanelAlpha(255, true /* animate */); - mDepthController.setBrightnessMirrorVisible(false); } /** diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt index 45a7d0a541557..a0c3ed9921151 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt @@ -69,7 +69,6 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { @Mock private lateinit var shadeSpring: NotificationShadeDepthController.DepthAnimation @Mock private lateinit var shadeAnimation: NotificationShadeDepthController.DepthAnimation @Mock private lateinit var globalActionsSpring: NotificationShadeDepthController.DepthAnimation - @Mock private lateinit var brightnessSpring: NotificationShadeDepthController.DepthAnimation @Mock private lateinit var listener: NotificationShadeDepthController.DepthListener @Mock private lateinit var dozeParameters: DozeParameters @JvmField @Rule val mockitoRule = MockitoJUnit.rule() @@ -97,7 +96,6 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { notificationShadeWindowController, dozeParameters, dumpManager) notificationShadeDepthController.shadeSpring = shadeSpring notificationShadeDepthController.shadeAnimation = shadeAnimation - notificationShadeDepthController.brightnessMirrorSpring = brightnessSpring notificationShadeDepthController.globalActionsSpring = globalActionsSpring notificationShadeDepthController.root = root @@ -244,31 +242,6 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { verify(wallpaperManager).setWallpaperZoomOut(any(), anyFloat()) } - @Test - fun brightnessMirrorVisible_whenVisible() { - notificationShadeDepthController.brightnessMirrorVisible = true - verify(brightnessSpring).animateTo(eq(maxBlur), any()) - } - - @Test - fun brightnessMirrorVisible_whenHidden() { - notificationShadeDepthController.brightnessMirrorVisible = false - verify(brightnessSpring).animateTo(eq(0), any()) - } - - @Test - fun brightnessMirror_hidesShadeBlur() { - // Brightness mirror is fully visible - `when`(brightnessSpring.ratio).thenReturn(1f) - // And shade is blurred - `when`(shadeSpring.radius).thenReturn(maxBlur) - `when`(shadeAnimation.radius).thenReturn(maxBlur) - - notificationShadeDepthController.updateBlurCallback.doFrame(0) - verify(notificationShadeWindowController).setBackgroundBlurRadius(0) - verify(blurUtils).applyBlur(eq(viewRootImpl), eq(0)) - } - @Test fun setNotificationLaunchAnimationParams_schedulesFrame() { val animProgress = ExpandAnimationParameters()