Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt +56 −54 Original line number Diff line number Diff line Loading @@ -152,6 +152,62 @@ object KeyguardRootViewBinder { } } } if ( KeyguardBottomAreaRefactor.isEnabled || DeviceEntryUdfpsRefactor.isEnabled ) { launch("$TAG#alpha") { viewModel.alpha(viewState).collect { alpha -> view.alpha = alpha if (KeyguardBottomAreaRefactor.isEnabled) { childViews[statusViewId]?.alpha = alpha childViews[burnInLayerId]?.alpha = alpha } } } } if (MigrateClocksToBlueprint.isEnabled) { 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 need to add translation to it here // same as translationX viewModel.translationY.collect { y -> childViews[burnInLayerId]?.translationY = y childViews[largeClockId]?.translationY = y childViews[aodNotificationIconContainerId]?.translationY = y } } launch("$TAG#translationX") { viewModel.translationX.collect { state -> val px = state.value ?: return@collect when { state.isToOrFrom(KeyguardState.AOD) -> { // Large Clock is not translated in the x direction childViews[burnInLayerId]?.translationX = px childViews[aodNotificationIconContainerId]?.translationX = px } state.isToOrFrom(KeyguardState.GLANCEABLE_HUB) -> { for ((key, childView) in childViews.entries) { when (key) { indicationArea, startButton, endButton, lockIcon, deviceEntryIcon -> { // Do not move these views } else -> childView.translationX = px } } } } } } } } } disposables += Loading Loading @@ -188,20 +244,6 @@ object KeyguardRootViewBinder { } } if ( KeyguardBottomAreaRefactor.isEnabled || DeviceEntryUdfpsRefactor.isEnabled ) { launch { viewModel.alpha(viewState).collect { alpha -> view.alpha = alpha if (KeyguardBottomAreaRefactor.isEnabled) { childViews[statusViewId]?.alpha = alpha childViews[burnInLayerId]?.alpha = alpha } } } } if (MigrateClocksToBlueprint.isEnabled) { launch { viewModel.burnInLayerVisibility.collect { visibility -> Loading @@ -221,46 +263,6 @@ object KeyguardRootViewBinder { } } launch { // 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 need to add translation to it here // same as translationX viewModel.translationY.collect { y -> childViews[burnInLayerId]?.translationY = y childViews[largeClockId]?.translationY = y childViews[aodNotificationIconContainerId]?.translationY = y } } launch { viewModel.translationX.collect { state -> val px = state.value ?: return@collect when { state.isToOrFrom(KeyguardState.AOD) -> { // Large Clock is not translated in the x direction childViews[burnInLayerId]?.translationX = px childViews[aodNotificationIconContainerId]?.translationX = px } state.isToOrFrom(KeyguardState.GLANCEABLE_HUB) -> { for ((key, childView) in childViews.entries) { when (key) { indicationArea, startButton, endButton, lockIcon, deviceEntryIcon -> { // Do not move these views } else -> childView.translationX = px } } } } } } launch { viewModel.scale.collect { scaleViewModel -> if (scaleViewModel.scaleClockOnly) { Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt +56 −54 Original line number Diff line number Diff line Loading @@ -152,6 +152,62 @@ object KeyguardRootViewBinder { } } } if ( KeyguardBottomAreaRefactor.isEnabled || DeviceEntryUdfpsRefactor.isEnabled ) { launch("$TAG#alpha") { viewModel.alpha(viewState).collect { alpha -> view.alpha = alpha if (KeyguardBottomAreaRefactor.isEnabled) { childViews[statusViewId]?.alpha = alpha childViews[burnInLayerId]?.alpha = alpha } } } } if (MigrateClocksToBlueprint.isEnabled) { 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 need to add translation to it here // same as translationX viewModel.translationY.collect { y -> childViews[burnInLayerId]?.translationY = y childViews[largeClockId]?.translationY = y childViews[aodNotificationIconContainerId]?.translationY = y } } launch("$TAG#translationX") { viewModel.translationX.collect { state -> val px = state.value ?: return@collect when { state.isToOrFrom(KeyguardState.AOD) -> { // Large Clock is not translated in the x direction childViews[burnInLayerId]?.translationX = px childViews[aodNotificationIconContainerId]?.translationX = px } state.isToOrFrom(KeyguardState.GLANCEABLE_HUB) -> { for ((key, childView) in childViews.entries) { when (key) { indicationArea, startButton, endButton, lockIcon, deviceEntryIcon -> { // Do not move these views } else -> childView.translationX = px } } } } } } } } } disposables += Loading Loading @@ -188,20 +244,6 @@ object KeyguardRootViewBinder { } } if ( KeyguardBottomAreaRefactor.isEnabled || DeviceEntryUdfpsRefactor.isEnabled ) { launch { viewModel.alpha(viewState).collect { alpha -> view.alpha = alpha if (KeyguardBottomAreaRefactor.isEnabled) { childViews[statusViewId]?.alpha = alpha childViews[burnInLayerId]?.alpha = alpha } } } } if (MigrateClocksToBlueprint.isEnabled) { launch { viewModel.burnInLayerVisibility.collect { visibility -> Loading @@ -221,46 +263,6 @@ object KeyguardRootViewBinder { } } launch { // 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 need to add translation to it here // same as translationX viewModel.translationY.collect { y -> childViews[burnInLayerId]?.translationY = y childViews[largeClockId]?.translationY = y childViews[aodNotificationIconContainerId]?.translationY = y } } launch { viewModel.translationX.collect { state -> val px = state.value ?: return@collect when { state.isToOrFrom(KeyguardState.AOD) -> { // Large Clock is not translated in the x direction childViews[burnInLayerId]?.translationX = px childViews[aodNotificationIconContainerId]?.translationX = px } state.isToOrFrom(KeyguardState.GLANCEABLE_HUB) -> { for ((key, childView) in childViews.entries) { when (key) { indicationArea, startButton, endButton, lockIcon, deviceEntryIcon -> { // Do not move these views } else -> childView.translationX = px } } } } } } launch { viewModel.scale.collect { scaleViewModel -> if (scaleViewModel.scaleClockOnly) { Loading