summaryrefslogtreecommitdiffhomepage
path: root/android/app/src
diff options
context:
space:
mode:
authorKalle Lindström <karl.lindstrom@mullvad.net>2025-04-02 17:20:56 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-04-04 13:46:15 +0200
commitaf2a71e61c0e5c70716ddd82205583f69c80adf4 (patch)
tree65d12c88e684f15fd5b86928dcfb64f4b3ff1fed /android/app/src
parent1e902d3a873ce0a789de0b32cfcf52ab72dacbdf (diff)
downloadmullvadvpn-af2a71e61c0e5c70716ddd82205583f69c80adf4.tar.xz
mullvadvpn-af2a71e61c0e5c70716ddd82205583f69c80adf4.zip
Add shadowsocks obfuscation e2e test
Diffstat (limited to 'android/app/src')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt4
2 files changed, 6 insertions, 1 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt
index 90b5da8891..37e582bb01 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/ObfuscationModeCell.kt
@@ -21,6 +21,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.semantics.selected
+import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import net.mullvad.mullvadvpn.R
@@ -66,6 +68,7 @@ fun ObfuscationModeCell(
.fillMaxWidth()
.background(MaterialTheme.colorScheme.surfaceContainerLow)
.let { if (testTag != null) it.testTag(testTag) else it }
+ .semantics { selected = isSelected }
) {
TwoRowCell(
modifier = Modifier.weight(1f),
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt
index 9d3688d352..d390e92f6a 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/SelectableCell.kt
@@ -11,6 +11,8 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.semantics.selected
+import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
@@ -58,7 +60,7 @@ fun SelectableCell(
testTag: String = "",
) {
BaseCell(
- modifier = modifier,
+ modifier = modifier.semantics { selected = isSelected },
onCellClicked = onCellClicked,
isRowEnabled = isEnabled,
headlineContent = {