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

Commit 4c7fd1c3 authored by Michael Mikhail's avatar Michael Mikhail
Browse files

Move resource tag of play pause button to the icon inside

Flag: com.android.systemui.media_controls_in_compose
Bug: 434232042
Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.media.QSMediaControllerPlayAndPause
Change-Id: I492be69ee89451ae3be0b210f8d8ead33fb0a759
parent aaeccbe7
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1260,7 +1260,7 @@ private fun ContentScope.PlayPauseAction(
            enabled = viewModel.onClick != null,
            enabled = viewModel.onClick != null,
            colors = ButtonDefaults.buttonColors(containerColor = buttonColor),
            colors = ButtonDefaults.buttonColors(containerColor = buttonColor),
            shape = RoundedCornerShape(cornerRadius),
            shape = RoundedCornerShape(cornerRadius),
            modifier = Modifier.size(buttonSize).sysuiResTag(MediaRes.PLAY_PAUSE_BTN),
            modifier = Modifier.size(buttonSize),
        ) {
        ) {
            when (viewModel.state) {
            when (viewModel.state) {
                is MediaSessionState.Playing,
                is MediaSessionState.Playing,
@@ -1285,7 +1285,7 @@ private fun ContentScope.PlayPauseAction(
                            painter = painter,
                            painter = painter,
                            contentDescription = viewModel.icon?.contentDescription?.load(),
                            contentDescription = viewModel.icon?.contentDescription?.load(),
                            tint = iconColor,
                            tint = iconColor,
                            modifier = Modifier.size(24.dp),
                            modifier = Modifier.size(24.dp).sysuiResTag(MediaRes.PLAY_PAUSE_BTN),
                        )
                        )
                    }
                    }
                }
                }