Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30a76487 authored by Andy CrossGate Yan's avatar Andy CrossGate Yan Committed by Arian
Browse files

SystemUI: Fix burn-in translations not applying to keyguard slices

Change-Id: Ic559f53de2ba2ee701f8e2335f7494dc91abb5c3
parent abae1af9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ object KeyguardRootViewBinder {
                        viewModel.alpha(viewState).collect { alpha ->
                            view.alpha = alpha
                            childViews[burnInLayerId]?.alpha = alpha
                            childViews[sliceViewId]?.alpha = alpha
                        }
                    }

@@ -186,6 +187,7 @@ object KeyguardRootViewBinder {
                        // need to add translation to it here same as translationX
                        viewModel.translationY.collect { y ->
                            childViews[burnInLayerId]?.translationY = y
                            childViews[sliceViewId]?.translationY = y
                            childViews[largeClockId]?.translationY = y
                            if (com.android.systemui.shared.Flags.clockReactiveSmartspaceLayout()) {
                                childViews[largeClockDateId]?.translationY = y
@@ -202,6 +204,7 @@ object KeyguardRootViewBinder {
                                state.isToOrFrom(KeyguardState.AOD) -> {
                                    // Large Clock is not translated in the x direction
                                    childViews[burnInLayerId]?.translationX = px
                                    childViews[sliceViewId]?.translationX = px
                                    childViews[aodPromotedNotificationId]?.translationX = px
                                    childViews[aodNotificationIconContainerId]?.translationX = px
                                }
@@ -259,6 +262,7 @@ object KeyguardRootViewBinder {
                    launch {
                        viewModel.burnInLayerVisibility.collect { visibility ->
                            childViews[burnInLayerId]?.visibility = visibility
                            childViews[sliceViewId]?.visibility = visibility
                        }
                    }

@@ -579,6 +583,7 @@ object KeyguardRootViewBinder {
    }

    private val burnInLayerId = R.id.burn_in_layer
    private val sliceViewId = R.id.keyguard_slice_view
    private val aodPromotedNotificationId = AodPromotedNotificationSection.viewId
    private val aodNotificationIconContainerId = R.id.aod_notification_icon_container
    private val largeClockId = customR.id.lockscreen_clock_view_large