Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ fun formatElapsedTime(
}
if (includeSeconds) {
val seconds = elapsedDuration.seconds % SECONDS_PER_MINUTE
if (LocalAmbientState.current.isInteractive) append("%02d".format(seconds))
else append("--")
if (LocalAmbientState.current.isInteractive) {
append("%02d".format(seconds))
} else {
append("--")
}
withStyle(style = MaterialTheme.typography.labelSmall.toSpanStyle()) {
append("s")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@
*/
package com.example.exercisesamplecompose.presentation.dialogs

import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.SportsScore
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.wear.compose.material3.ConfirmationDialog
import androidx.wear.compose.material3.Icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,16 @@ constructor(

companion object {
val permissions = buildList {
add(Manifest.permission.BODY_SENSORS)
add(Manifest.permission.ACCESS_FINE_LOCATION)
add(Manifest.permission.ACTIVITY_RECOGNITION)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
add(Manifest.permission.POST_NOTIFICATIONS)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA) {
add(HealthPermissions.READ_HEART_RATE)
} else {
add(Manifest.permission.BODY_SENSORS)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ExerciseScreenTest(
ExerciseServiceState()
),
exerciseState = ExerciseServiceState()
),
)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ class PreparingExerciseScreenTest(
}_${device.id}$suffix.png"

@Composable
override fun TestScaffold(content: @Composable () -> Unit) {
override fun TestScaffold(content: @Composable () -> Unit) {
CorrectLayout {
AppScaffold(timeText = {}) {
content()
}
}
}


@Test
fun preparing() =
runTest {
Expand Down
Loading