Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/BottomAreaSection.kt +17 −21 Original line number Diff line number Diff line Loading @@ -70,7 +70,6 @@ constructor( key = if (isStart) StartButtonElementKey else EndButtonElementKey, modifier = modifier, ) { content { Shortcut( viewId = if (isStart) R.id.start_button else R.id.end_button, viewModel = if (isStart) viewModel.startButton else viewModel.endButton, Loading @@ -86,19 +85,16 @@ constructor( ) } } } @Composable fun ContentScope.IndicationArea(modifier: Modifier = Modifier) { Element(key = IndicationAreaElementKey, modifier = modifier.indicationAreaPadding()) { content { IndicationArea( indicationAreaViewModel = indicationAreaViewModel, indicationController = indicationController, ) } } } @Composable fun shortcutSizeDp(): DpSize { Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +10 −14 Original line number Diff line number Diff line Loading @@ -26,11 +26,9 @@ import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.key import androidx.compose.ui.Modifier import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.viewinterop.AndroidView import androidx.core.view.contains import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.compose.animation.scene.ContentScope import com.android.compose.modifiers.padding Loading Loading @@ -132,7 +130,6 @@ constructor( } Element(key = largeClockElementKey, modifier = modifier) { content { ClockView( checkNotNull(currentClock).largeClock.view, modifier = Loading @@ -145,7 +142,6 @@ constructor( ) } } } fun getClockCenteringDistance(): Float { return Resources.getSystem().displayMetrics.widthPixels / 4f Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/SmartSpaceSection.kt +50 −53 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ constructor( val resources = LocalContext.current.resources Element(key = ClockElementKeys.smartspaceElementKey, modifier = modifier) { content { Column( modifier = modifier Loading @@ -84,8 +83,7 @@ constructor( return@Column } val paddingBelowClockStart = dimensionResource(R.dimen.below_clock_padding_start) val paddingBelowClockStart = dimensionResource(R.dimen.below_clock_padding_start) val paddingBelowClockEnd = dimensionResource(R.dimen.below_clock_padding_end) val paddingCardHorizontal = paddingBelowClockEnd Loading Loading @@ -126,7 +124,6 @@ constructor( } } } } @Composable private fun Card(modifier: Modifier = Modifier) { Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt +4 −9 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.runtime.Composable import androidx.compose.runtime.key import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.dimensionResource Loading Loading @@ -109,16 +108,12 @@ constructor( modifier: Modifier = Modifier, ) { Element(key = elementKey, modifier) { content { ClockView( clock.largeClock.layout.views.firstOrNull { it.id == weatherClockElementViewId }, clock.largeClock.layout.views.firstOrNull { it.id == weatherClockElementViewId }, modifier, ) } } } @Composable fun ContentScope.LargeClockSectionBelowSmartspace( Loading packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt +3 −5 Original line number Diff line number Diff line Loading @@ -116,11 +116,9 @@ fun ContentScope.FooterActionsWithAnimatedVisibility( QuickSettingsTheme { // This view has its own horizontal padding // TODO(b/321716470) This should use a lifecycle tied to the scene. FooterActions( viewModel = viewModel, qsVisibilityLifecycleOwner = lifecycleOwner, modifier = Modifier.element(QuickSettings.Elements.FooterActions), ) Element(QuickSettings.Elements.FooterActions, Modifier) { FooterActions(viewModel = viewModel, qsVisibilityLifecycleOwner = lifecycleOwner) } } } } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/BottomAreaSection.kt +17 −21 Original line number Diff line number Diff line Loading @@ -70,7 +70,6 @@ constructor( key = if (isStart) StartButtonElementKey else EndButtonElementKey, modifier = modifier, ) { content { Shortcut( viewId = if (isStart) R.id.start_button else R.id.end_button, viewModel = if (isStart) viewModel.startButton else viewModel.endButton, Loading @@ -86,19 +85,16 @@ constructor( ) } } } @Composable fun ContentScope.IndicationArea(modifier: Modifier = Modifier) { Element(key = IndicationAreaElementKey, modifier = modifier.indicationAreaPadding()) { content { IndicationArea( indicationAreaViewModel = indicationAreaViewModel, indicationController = indicationController, ) } } } @Composable fun shortcutSizeDp(): DpSize { Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +10 −14 Original line number Diff line number Diff line Loading @@ -26,11 +26,9 @@ import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.key import androidx.compose.ui.Modifier import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.viewinterop.AndroidView import androidx.core.view.contains import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.compose.animation.scene.ContentScope import com.android.compose.modifiers.padding Loading Loading @@ -132,7 +130,6 @@ constructor( } Element(key = largeClockElementKey, modifier = modifier) { content { ClockView( checkNotNull(currentClock).largeClock.view, modifier = Loading @@ -145,7 +142,6 @@ constructor( ) } } } fun getClockCenteringDistance(): Float { return Resources.getSystem().displayMetrics.widthPixels / 4f Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/SmartSpaceSection.kt +50 −53 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ constructor( val resources = LocalContext.current.resources Element(key = ClockElementKeys.smartspaceElementKey, modifier = modifier) { content { Column( modifier = modifier Loading @@ -84,8 +83,7 @@ constructor( return@Column } val paddingBelowClockStart = dimensionResource(R.dimen.below_clock_padding_start) val paddingBelowClockStart = dimensionResource(R.dimen.below_clock_padding_start) val paddingBelowClockEnd = dimensionResource(R.dimen.below_clock_padding_end) val paddingCardHorizontal = paddingBelowClockEnd Loading Loading @@ -126,7 +124,6 @@ constructor( } } } } @Composable private fun Card(modifier: Modifier = Modifier) { Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt +4 −9 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.runtime.Composable import androidx.compose.runtime.key import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.dimensionResource Loading Loading @@ -109,16 +108,12 @@ constructor( modifier: Modifier = Modifier, ) { Element(key = elementKey, modifier) { content { ClockView( clock.largeClock.layout.views.firstOrNull { it.id == weatherClockElementViewId }, clock.largeClock.layout.views.firstOrNull { it.id == weatherClockElementViewId }, modifier, ) } } } @Composable fun ContentScope.LargeClockSectionBelowSmartspace( Loading
packages/SystemUI/compose/features/src/com/android/systemui/qs/footer/ui/compose/FooterActions.kt +3 −5 Original line number Diff line number Diff line Loading @@ -116,11 +116,9 @@ fun ContentScope.FooterActionsWithAnimatedVisibility( QuickSettingsTheme { // This view has its own horizontal padding // TODO(b/321716470) This should use a lifecycle tied to the scene. FooterActions( viewModel = viewModel, qsVisibilityLifecycleOwner = lifecycleOwner, modifier = Modifier.element(QuickSettings.Elements.FooterActions), ) Element(QuickSettings.Elements.FooterActions, Modifier) { FooterActions(viewModel = viewModel, qsVisibilityLifecycleOwner = lifecycleOwner) } } } } Loading