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

Unverified Commit 5eb188b4 authored by LuK1337's avatar LuK1337 Committed by Michael Bestas
Browse files

SystemUI: Fix media section constraints with Smartspace disabled

Change-Id: Iffdaa512298ebb9c0e674d9b8ee2ed9e62955501
parent 36e35798
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import androidx.constraintlayout.widget.ConstraintSet.START
import androidx.constraintlayout.widget.ConstraintSet.TOP
import com.android.systemui.customization.clocks.R as clocksR
import com.android.systemui.keyguard.shared.model.KeyguardSection
import com.android.systemui.keyguard.ui.viewmodel.KeyguardSmartspaceViewModel
import com.android.systemui.media.controls.ui.controller.KeyguardMediaController
import com.android.systemui.res.R
import com.android.systemui.shade.ShadeDisplayAware
@@ -40,6 +41,7 @@ class SplitShadeMediaSection
constructor(
    @ShadeDisplayAware private val context: Context,
    private val keyguardMediaController: KeyguardMediaController,
    private val smartspaceViewModel: KeyguardSmartspaceViewModel,
) : KeyguardSection() {
    private val mediaContainerId = R.id.status_view_media_container

@@ -66,7 +68,11 @@ constructor(
        constraintSet.apply {
            constrainWidth(mediaContainerId, MATCH_CONSTRAINT)
            constrainHeight(mediaContainerId, WRAP_CONTENT)
            if (smartspaceViewModel.isSmartspaceEnabled) {
                connect(mediaContainerId, TOP, R.id.smart_space_barrier_bottom, BOTTOM)
            } else {
                connect(mediaContainerId, TOP, R.id.keyguard_slice_view, BOTTOM)
            }
            connect(mediaContainerId, START, PARENT_ID, START)
            connect(mediaContainerId, END, R.id.split_shade_guideline, END)
        }