Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.Flags import com.android.systemui.SysuiTestCase import com.android.systemui.animation.ShadeInterpolation import com.android.systemui.dump.DumpManager import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.kosmos.testScope import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.res.R Loading Loading @@ -80,6 +81,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { @Mock private lateinit var blurUtils: BlurUtils @Mock private lateinit var biometricUnlockController: BiometricUnlockController @Mock private lateinit var keyguardStateController: KeyguardStateController @Mock private lateinit var keyguardInteractor: KeyguardInteractor @Mock private lateinit var choreographer: Choreographer @Mock private lateinit var wallpaperController: WallpaperController @Mock private lateinit var notificationShadeWindowController: NotificationShadeWindowController Loading Loading @@ -123,6 +125,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { blurUtils, biometricUnlockController, keyguardStateController, keyguardInteractor, choreographer, wallpaperController, notificationShadeWindowController, Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt +10 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,8 @@ interface KeyguardRepository { val panelAlpha: MutableStateFlow<Float> val zoomOut: StateFlow<Float> /** * Observable for whether the keyguard is showing. * Loading Loading @@ -278,6 +280,9 @@ interface KeyguardRepository { /** Temporary shim for fading out content when the brightness slider is used */ fun setPanelAlpha(alpha: Float) /** Sets the zoom out scale of spatial model pushback from e.g. pulling down the shade. */ fun setZoomOut(zoomOutFromShadeRadius: Float) /** Whether the device is actively dreaming */ fun setDreaming(isDreaming: Boolean) Loading Loading @@ -381,6 +386,7 @@ constructor( override val onCameraLaunchDetected = MutableStateFlow(CameraLaunchSourceModel()) override val panelAlpha: MutableStateFlow<Float> = MutableStateFlow(1f) override val zoomOut: MutableStateFlow<Float> = MutableStateFlow(0f) override val topClippingBounds = MutableStateFlow<Int?>(null) override val isKeyguardShowing: MutableStateFlow<Boolean> = Loading Loading @@ -662,6 +668,10 @@ constructor( panelAlpha.value = alpha } override fun setZoomOut(zoomOutFromShadeRadius: Float) { zoomOut.value = zoomOutFromShadeRadius } override fun setDreaming(isDreaming: Boolean) { this.isDreaming.value = isDreaming } Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt +7 −0 Original line number Diff line number Diff line Loading @@ -337,6 +337,9 @@ constructor( @Deprecated("SceneContainer uses NotificationStackAppearanceInteractor") val panelAlpha: StateFlow<Float> = repository.panelAlpha.asStateFlow() /** Sets the zoom out scale of spatial model pushback from e.g. pulling down the shade. */ val zoomOut: StateFlow<Float> = repository.zoomOut /** * When the lockscreen can be dismissed, emit an alpha value as the user swipes up. This is * useful just before the code commits to moving to GONE. Loading Loading @@ -475,6 +478,10 @@ constructor( repository.setPanelAlpha(alpha) } fun setZoomOut(zoomOutFromShadeRadius: Float) { repository.setZoomOut(zoomOutFromShadeRadius) } fun setAnimateDozingTransitions(animate: Boolean) { repository.setAnimateDozingTransitions(animate) } Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt +7 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,13 @@ object KeyguardRootViewBinder { } } launch("$TAG#zoomOut") { viewModel.scaleFromZoomOut.collect { scaleFromZoomOut -> view.scaleX = scaleFromZoomOut view.scaleY = scaleFromZoomOut } } launch("$TAG#translationY") { // When translation happens in burnInLayer, it won't be weather clock large // clock isn't added to burnInLayer due to its scale transition so we also Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt +4 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,9 @@ constructor( .distinctUntilChanged() } val scaleFromZoomOut: Flow<Float> = keyguardInteractor.zoomOut.map { 1 - it * PUSHBACK_SCALE_FOR_LOCKSCREEN } val translationY: Flow<Float> = aodBurnInViewModel.movement.map { it.translationY.toFloat() } val translationX: Flow<StateToValue> = Loading Loading @@ -418,5 +421,6 @@ constructor( companion object { private const val TAG = "KeyguardRootViewModel" private const val PUSHBACK_SCALE_FOR_LOCKSCREEN = 0.05f } } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.Flags import com.android.systemui.SysuiTestCase import com.android.systemui.animation.ShadeInterpolation import com.android.systemui.dump.DumpManager import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.kosmos.testScope import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.res.R Loading Loading @@ -80,6 +81,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { @Mock private lateinit var blurUtils: BlurUtils @Mock private lateinit var biometricUnlockController: BiometricUnlockController @Mock private lateinit var keyguardStateController: KeyguardStateController @Mock private lateinit var keyguardInteractor: KeyguardInteractor @Mock private lateinit var choreographer: Choreographer @Mock private lateinit var wallpaperController: WallpaperController @Mock private lateinit var notificationShadeWindowController: NotificationShadeWindowController Loading Loading @@ -123,6 +125,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { blurUtils, biometricUnlockController, keyguardStateController, keyguardInteractor, choreographer, wallpaperController, notificationShadeWindowController, Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt +10 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,8 @@ interface KeyguardRepository { val panelAlpha: MutableStateFlow<Float> val zoomOut: StateFlow<Float> /** * Observable for whether the keyguard is showing. * Loading Loading @@ -278,6 +280,9 @@ interface KeyguardRepository { /** Temporary shim for fading out content when the brightness slider is used */ fun setPanelAlpha(alpha: Float) /** Sets the zoom out scale of spatial model pushback from e.g. pulling down the shade. */ fun setZoomOut(zoomOutFromShadeRadius: Float) /** Whether the device is actively dreaming */ fun setDreaming(isDreaming: Boolean) Loading Loading @@ -381,6 +386,7 @@ constructor( override val onCameraLaunchDetected = MutableStateFlow(CameraLaunchSourceModel()) override val panelAlpha: MutableStateFlow<Float> = MutableStateFlow(1f) override val zoomOut: MutableStateFlow<Float> = MutableStateFlow(0f) override val topClippingBounds = MutableStateFlow<Int?>(null) override val isKeyguardShowing: MutableStateFlow<Boolean> = Loading Loading @@ -662,6 +668,10 @@ constructor( panelAlpha.value = alpha } override fun setZoomOut(zoomOutFromShadeRadius: Float) { zoomOut.value = zoomOutFromShadeRadius } override fun setDreaming(isDreaming: Boolean) { this.isDreaming.value = isDreaming } Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt +7 −0 Original line number Diff line number Diff line Loading @@ -337,6 +337,9 @@ constructor( @Deprecated("SceneContainer uses NotificationStackAppearanceInteractor") val panelAlpha: StateFlow<Float> = repository.panelAlpha.asStateFlow() /** Sets the zoom out scale of spatial model pushback from e.g. pulling down the shade. */ val zoomOut: StateFlow<Float> = repository.zoomOut /** * When the lockscreen can be dismissed, emit an alpha value as the user swipes up. This is * useful just before the code commits to moving to GONE. Loading Loading @@ -475,6 +478,10 @@ constructor( repository.setPanelAlpha(alpha) } fun setZoomOut(zoomOutFromShadeRadius: Float) { repository.setZoomOut(zoomOutFromShadeRadius) } fun setAnimateDozingTransitions(animate: Boolean) { repository.setAnimateDozingTransitions(animate) } Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt +7 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,13 @@ object KeyguardRootViewBinder { } } launch("$TAG#zoomOut") { viewModel.scaleFromZoomOut.collect { scaleFromZoomOut -> view.scaleX = scaleFromZoomOut view.scaleY = scaleFromZoomOut } } launch("$TAG#translationY") { // When translation happens in burnInLayer, it won't be weather clock large // clock isn't added to burnInLayer due to its scale transition so we also Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt +4 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,9 @@ constructor( .distinctUntilChanged() } val scaleFromZoomOut: Flow<Float> = keyguardInteractor.zoomOut.map { 1 - it * PUSHBACK_SCALE_FOR_LOCKSCREEN } val translationY: Flow<Float> = aodBurnInViewModel.movement.map { it.translationY.toFloat() } val translationX: Flow<StateToValue> = Loading Loading @@ -418,5 +421,6 @@ constructor( companion object { private const val TAG = "KeyguardRootViewModel" private const val PUSHBACK_SCALE_FOR_LOCKSCREEN = 0.05f } }