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

Commit b655794c authored by LuK1337's avatar LuK1337 Committed by Tim Schumacher
Browse files

SystemUI: Fix media section constraints with Smartspace disabled

Change-Id: Iffdaa512298ebb9c0e674d9b8ee2ed9e62955501
parent 95e02d28
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import androidx.constraintlayout.widget.ConstraintSet.TOP
import com.android.systemui.customization.R as customR
import com.android.systemui.keyguard.MigrateClocksToBlueprint
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.NotificationPanelView
@@ -44,6 +45,7 @@ constructor(
    @ShadeDisplayAware private val context: Context,
    private val notificationPanelView: NotificationPanelView,
    private val keyguardMediaController: KeyguardMediaController,
    private val smartspaceViewModel: KeyguardSmartspaceViewModel,
) : KeyguardSection() {
    private val mediaContainerId = R.id.status_view_media_container

@@ -82,7 +84,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)
        }