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

Unverified Commit 4be64b32 authored by Andy CrossGate Yan's avatar Andy CrossGate Yan Committed by Michael Bestas
Browse files

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

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

@@ -218,6 +219,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
@@ -234,6 +236,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
                                }
@@ -282,6 +285,7 @@ object KeyguardRootViewBinder {
                    launch {
                        viewModel.burnInLayerVisibility.collect { visibility ->
                            childViews[burnInLayerId]?.visibility = visibility
                            childViews[sliceViewId]?.visibility = visibility
                        }
                    }

@@ -574,6 +578,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 = ClockViewIds.LOCKSCREEN_CLOCK_VIEW_LARGE