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

Commit 091606b6 authored by Anton Potapov's avatar Anton Potapov
Browse files

Add custom paneTitle for the Volume Panel

Flag: aconfig new_volume_panel NEXTFOOD
Test: manual on the foldable. Open the Volume Panel with the voice over enabled.
Fixes: 339157493
Change-Id: I96615621814f01cd7645b58048f2338b439e2ee8
parent 72c37464
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -28,7 +28,11 @@ import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.paneTitle
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import com.android.systemui.res.R
import com.android.systemui.volume.panel.ui.layout.ComponentsLayout
import com.android.systemui.volume.panel.ui.viewmodel.VolumePanelState
import com.android.systemui.volume.panel.ui.viewmodel.VolumePanelViewModel
@@ -49,6 +53,7 @@ fun VolumePanelRoot(
        }
    }

    val accessibilityTitle = stringResource(R.string.accessibility_volume_settings)
    val state: VolumePanelState by viewModel.volumePanelState.collectAsState()
    val components by viewModel.componentsLayout.collectAsState(null)

@@ -56,7 +61,9 @@ fun VolumePanelRoot(
        components?.let { componentsState ->
            Components(
                componentsState,
                modifier.padding(
                modifier
                    .semantics { paneTitle = accessibilityTitle }
                    .padding(
                        start = padding,
                        top = padding,
                        end = padding,