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

Commit 2e9dbd7f authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB][Chips] Localize the screen record 3-2-1 countdown text.

Not all locales use Arabic numerals, so we should use NumberFormat to
correctly format the 3-2-1 countdown to the right numeric system.

Fixes: 412426285
Flag: com.android.systemui.status_bar_chips_modernization
Test: Use locale with non-Western Arabic numeral system then start
screen record -> verify 3-2-1 countdown is in that numeral system

Change-Id: Ie665b012a6c77d8127c1b6e6cb3a7451d811179a
parent 3e742f2f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.viewmodel.formatTimeRemainingData
import com.android.systemui.statusbar.chips.ui.viewmodel.rememberChronometerState
import com.android.systemui.statusbar.chips.ui.viewmodel.rememberTimeRemainingState
import java.text.NumberFormat
import kotlin.math.min

@OptIn(ExperimentalMaterial3ExpressiveApi::class)
@@ -107,7 +108,7 @@ fun ChipContent(
        }

        is OngoingActivityChipModel.Content.Countdown -> {
            val text = viewModel.secondsUntilStarted.toString()
            val text = NumberFormat.getIntegerInstance().format(viewModel.secondsUntilStarted)
            Text(
                text = text,
                style = textStyle,