Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +0 −12 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) Loading Loading @@ -263,7 +253,6 @@ class NotificationShadeDepthController @Inject constructor( shadeSpring.finishIfRunning() shadeAnimation.finishIfRunning() globalActionsSpring.finishIfRunning() brightnessMirrorSpring.finishIfRunning() } } Loading Loading @@ -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}") Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java +0 −2 Original line number Diff line number Diff line Loading @@ -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); } /** Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +0 −27 Original line number Diff line number Diff line Loading @@ -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() Loading Loading @@ -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 Loading Loading @@ -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() Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +0 −12 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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) Loading Loading @@ -263,7 +253,6 @@ class NotificationShadeDepthController @Inject constructor( shadeSpring.finishIfRunning() shadeAnimation.finishIfRunning() globalActionsSpring.finishIfRunning() brightnessMirrorSpring.finishIfRunning() } } Loading Loading @@ -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}") Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java +0 −2 Original line number Diff line number Diff line Loading @@ -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); } /** Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +0 −27 Original line number Diff line number Diff line Loading @@ -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() Loading Loading @@ -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 Loading Loading @@ -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() Loading