From fe993f7d33e975a490e4dc9e4cd728944cd2d97c Mon Sep 17 00:00:00 2001 From: Chandru S Date: Tue, 10 Sep 2024 01:39:20 +0000 Subject: Fix issue with PIN output content not center aligned as expected. Before this all the dots were left aligned. Fixes: 365648186 Test: turn on flexiglass 1. Set PIN bouncer 2. Enter pin digits and see the dots are horizontally centered 3. disable flexiglass and enable compose_bouncer and verify the same Flag: com.android.systemui.scene_container Flag: com.android.systemui.compose_bouncer Change-Id: Ib9cde15b0f2d3adc670360029648c6b6bcd1ff8b --- .../com/android/systemui/bouncer/ui/composable/PinInputDisplay.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PinInputDisplay.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PinInputDisplay.kt index ba885f7da2cf..1f98cd8e07c0 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PinInputDisplay.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PinInputDisplay.kt @@ -65,7 +65,6 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.Constraints import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import androidx.compose.ui.window.Dialog import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.compose.PlatformOutlinedButton import com.android.compose.animation.Easings @@ -355,7 +354,10 @@ private class PinInputRow( fun Content(modifier: Modifier) { // Wrap PIN entry in a Box so it is visible to accessibility (even if empty). - Box(modifier = modifier.fillMaxWidth().wrapContentHeight()) { + Box( + modifier = modifier.fillMaxWidth().wrapContentHeight(), + contentAlignment = Alignment.Center, + ) { Row( modifier .heightIn(min = shapeAnimations.shapeSize) -- cgit v1.2.3-59-g8ed1b