Loading packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/CommunalLockSection.kt +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ constructor( val scaleFactor = authController.scaleFactor val bottomPaddingPx = context.resources.getDimensionPixelSize( com.android.systemui.customization.R.dimen.lock_icon_margin_bottom com.android.systemui.customization.clocks.R.dimen.lock_icon_margin_bottom ) val heightPx = windowViewBounds.bottom.toFloat() val (center, radius) = Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +3 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ import androidx.compose.ui.viewinterop.AndroidView import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.compose.animation.scene.ContentScope import com.android.compose.modifiers.padding import com.android.systemui.customization.R import com.android.systemui.customization.clocks.R as clocksR import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.largeClockElementKey import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.smallClockElementKey import com.android.systemui.keyguard.ui.composable.blueprint.ClockScenes.largeClockScene Loading Loading @@ -92,8 +92,8 @@ constructor( checkNotNull(currentClock).smallClock.view, modifier = modifier .height(dimensionResource(R.dimen.small_clock_height)) .padding(horizontal = dimensionResource(R.dimen.clock_padding_start)) .height(dimensionResource(clocksR.dimen.small_clock_height)) .padding(horizontal = dimensionResource(clocksR.dimen.clock_padding_start)) .padding(top = { smallTopMargin }) .onTopPlacementChanged(onTopChanged) .burnInAware(viewModel = aodBurnInViewModel, params = burnInParams) Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/LockSection.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ import androidx.compose.ui.viewinterop.AndroidView import com.android.compose.animation.scene.ContentScope import com.android.compose.animation.scene.ElementKey import com.android.systemui.biometrics.AuthController import com.android.systemui.customization.R as customR import com.android.systemui.customization.clocks.R as clocksR import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.flags.FeatureFlagsClassic Loading Loading @@ -155,7 +155,7 @@ constructor( } else { val scaleFactor = authController.scaleFactor val bottomPaddingPx = context.resources.getDimensionPixelSize(customR.dimen.lock_icon_margin_bottom) context.resources.getDimensionPixelSize(clocksR.dimen.lock_icon_margin_bottom) val heightPx = windowViewBounds.bottom.toFloat() Pair( Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt +1 −0 Original line number Diff line number Diff line Loading @@ -246,6 +246,7 @@ constructor( * @param name Name of resources * @param density Density required to convert dimen from Int To Dp */ @Deprecated("Prefer reading dimensions directly") private fun getDimen(context: Context, name: String, density: Density): Dp { val res = context.packageManager.getResourcesForApplication(context.packageName) val id = res.getIdentifier(name, "dimen", context.packageName) Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt +10 −9 Original line number Diff line number Diff line Loading @@ -29,13 +29,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.dimensionResource import com.android.compose.animation.scene.ContentScope import com.android.compose.animation.scene.ElementKey import com.android.systemui.customization.R as customR import com.android.systemui.customization.clocks.R as clocksR import com.android.systemui.keyguard.ui.composable.blueprint.WeatherClockElementKeys import com.android.systemui.keyguard.ui.composable.modifier.burnInAware import com.android.systemui.keyguard.ui.viewmodel.AodBurnInViewModel import com.android.systemui.keyguard.ui.viewmodel.BurnInParameters import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel import com.android.systemui.plugins.clocks.ClockController import com.android.systemui.plugins.clocks.ClockViewIds import javax.inject.Inject /** Provides small clock and large clock composables for the weather clock layout. */ Loading @@ -49,11 +50,11 @@ constructor( fun ContentScope.Time(clock: ClockController, burnInParams: BurnInParameters) { Row( modifier = Modifier.padding(horizontal = dimensionResource(customR.dimen.clock_padding_start)) Modifier.padding(horizontal = dimensionResource(clocksR.dimen.clock_padding_start)) .burnInAware(aodBurnInViewModel, burnInParams, isClock = true) ) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_time, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_TIME, clock = clock, elementKey = WeatherClockElementKeys.timeElementKey, ) Loading @@ -63,7 +64,7 @@ constructor( @Composable private fun ContentScope.Date(clock: ClockController, modifier: Modifier = Modifier) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_date, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_DATE, clock = clock, elementKey = WeatherClockElementKeys.dateElementKey, modifier = modifier, Loading @@ -73,7 +74,7 @@ constructor( @Composable private fun ContentScope.Weather(clock: ClockController, modifier: Modifier = Modifier) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_weather_icon, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_ICON, clock = clock, elementKey = WeatherClockElementKeys.weatherIconElementKey, modifier = modifier.wrapContentSize(), Loading @@ -83,7 +84,7 @@ constructor( @Composable private fun ContentScope.DndAlarmStatus(clock: ClockController, modifier: Modifier = Modifier) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_alarm_dnd, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_ALARM_DND, clock = clock, elementKey = WeatherClockElementKeys.dndAlarmElementKey, modifier = modifier.wrapContentSize(), Loading @@ -93,7 +94,7 @@ constructor( @Composable private fun ContentScope.Temperature(clock: ClockController, modifier: Modifier = Modifier) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_temperature, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_TEMP, clock = clock, elementKey = WeatherClockElementKeys.temperatureElementKey, modifier = modifier.wrapContentSize(), Loading Loading @@ -123,14 +124,14 @@ constructor( Row( modifier = Modifier.height(IntrinsicSize.Max) .padding(horizontal = dimensionResource(customR.dimen.clock_padding_start)) .padding(horizontal = dimensionResource(clocksR.dimen.clock_padding_start)) .burnInAware(aodBurnInViewModel, burnInParams, isClock = true) ) { Date(clock = clock, modifier = Modifier.wrapContentSize()) Box( modifier = Modifier.fillMaxSize() .padding(start = dimensionResource(customR.dimen.clock_padding_start)) .padding(start = dimensionResource(clocksR.dimen.clock_padding_start)) ) { Weather(clock = clock, modifier = Modifier.align(Alignment.TopStart)) Temperature(clock = clock, modifier = Modifier.align(Alignment.BottomEnd)) Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/CommunalLockSection.kt +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ constructor( val scaleFactor = authController.scaleFactor val bottomPaddingPx = context.resources.getDimensionPixelSize( com.android.systemui.customization.R.dimen.lock_icon_margin_bottom com.android.systemui.customization.clocks.R.dimen.lock_icon_margin_bottom ) val heightPx = windowViewBounds.bottom.toFloat() val (center, radius) = Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/DefaultClockSection.kt +3 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ import androidx.compose.ui.viewinterop.AndroidView import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.android.compose.animation.scene.ContentScope import com.android.compose.modifiers.padding import com.android.systemui.customization.R import com.android.systemui.customization.clocks.R as clocksR import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.largeClockElementKey import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.smallClockElementKey import com.android.systemui.keyguard.ui.composable.blueprint.ClockScenes.largeClockScene Loading Loading @@ -92,8 +92,8 @@ constructor( checkNotNull(currentClock).smallClock.view, modifier = modifier .height(dimensionResource(R.dimen.small_clock_height)) .padding(horizontal = dimensionResource(R.dimen.clock_padding_start)) .height(dimensionResource(clocksR.dimen.small_clock_height)) .padding(horizontal = dimensionResource(clocksR.dimen.clock_padding_start)) .padding(top = { smallTopMargin }) .onTopPlacementChanged(onTopChanged) .burnInAware(viewModel = aodBurnInViewModel, params = burnInParams) Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/LockSection.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ import androidx.compose.ui.viewinterop.AndroidView import com.android.compose.animation.scene.ContentScope import com.android.compose.animation.scene.ElementKey import com.android.systemui.biometrics.AuthController import com.android.systemui.customization.R as customR import com.android.systemui.customization.clocks.R as clocksR import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.flags.FeatureFlagsClassic Loading Loading @@ -155,7 +155,7 @@ constructor( } else { val scaleFactor = authController.scaleFactor val bottomPaddingPx = context.resources.getDimensionPixelSize(customR.dimen.lock_icon_margin_bottom) context.resources.getDimensionPixelSize(clocksR.dimen.lock_icon_margin_bottom) val heightPx = windowViewBounds.bottom.toFloat() Pair( Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt +1 −0 Original line number Diff line number Diff line Loading @@ -246,6 +246,7 @@ constructor( * @param name Name of resources * @param density Density required to convert dimen from Int To Dp */ @Deprecated("Prefer reading dimensions directly") private fun getDimen(context: Context, name: String, density: Density): Dp { val res = context.packageManager.getResourcesForApplication(context.packageName) val id = res.getIdentifier(name, "dimen", context.packageName) Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt +10 −9 Original line number Diff line number Diff line Loading @@ -29,13 +29,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.dimensionResource import com.android.compose.animation.scene.ContentScope import com.android.compose.animation.scene.ElementKey import com.android.systemui.customization.R as customR import com.android.systemui.customization.clocks.R as clocksR import com.android.systemui.keyguard.ui.composable.blueprint.WeatherClockElementKeys import com.android.systemui.keyguard.ui.composable.modifier.burnInAware import com.android.systemui.keyguard.ui.viewmodel.AodBurnInViewModel import com.android.systemui.keyguard.ui.viewmodel.BurnInParameters import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel import com.android.systemui.plugins.clocks.ClockController import com.android.systemui.plugins.clocks.ClockViewIds import javax.inject.Inject /** Provides small clock and large clock composables for the weather clock layout. */ Loading @@ -49,11 +50,11 @@ constructor( fun ContentScope.Time(clock: ClockController, burnInParams: BurnInParameters) { Row( modifier = Modifier.padding(horizontal = dimensionResource(customR.dimen.clock_padding_start)) Modifier.padding(horizontal = dimensionResource(clocksR.dimen.clock_padding_start)) .burnInAware(aodBurnInViewModel, burnInParams, isClock = true) ) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_time, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_TIME, clock = clock, elementKey = WeatherClockElementKeys.timeElementKey, ) Loading @@ -63,7 +64,7 @@ constructor( @Composable private fun ContentScope.Date(clock: ClockController, modifier: Modifier = Modifier) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_date, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_DATE, clock = clock, elementKey = WeatherClockElementKeys.dateElementKey, modifier = modifier, Loading @@ -73,7 +74,7 @@ constructor( @Composable private fun ContentScope.Weather(clock: ClockController, modifier: Modifier = Modifier) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_weather_icon, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_ICON, clock = clock, elementKey = WeatherClockElementKeys.weatherIconElementKey, modifier = modifier.wrapContentSize(), Loading @@ -83,7 +84,7 @@ constructor( @Composable private fun ContentScope.DndAlarmStatus(clock: ClockController, modifier: Modifier = Modifier) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_alarm_dnd, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_ALARM_DND, clock = clock, elementKey = WeatherClockElementKeys.dndAlarmElementKey, modifier = modifier.wrapContentSize(), Loading @@ -93,7 +94,7 @@ constructor( @Composable private fun ContentScope.Temperature(clock: ClockController, modifier: Modifier = Modifier) { WeatherElement( weatherClockElementViewId = customR.id.weather_clock_temperature, weatherClockElementViewId = ClockViewIds.WEATHER_CLOCK_TEMP, clock = clock, elementKey = WeatherClockElementKeys.temperatureElementKey, modifier = modifier.wrapContentSize(), Loading Loading @@ -123,14 +124,14 @@ constructor( Row( modifier = Modifier.height(IntrinsicSize.Max) .padding(horizontal = dimensionResource(customR.dimen.clock_padding_start)) .padding(horizontal = dimensionResource(clocksR.dimen.clock_padding_start)) .burnInAware(aodBurnInViewModel, burnInParams, isClock = true) ) { Date(clock = clock, modifier = Modifier.wrapContentSize()) Box( modifier = Modifier.fillMaxSize() .padding(start = dimensionResource(customR.dimen.clock_padding_start)) .padding(start = dimensionResource(clocksR.dimen.clock_padding_start)) ) { Weather(clock = clock, modifier = Modifier.align(Alignment.TopStart)) Temperature(clock = clock, modifier = Modifier.align(Alignment.BottomEnd)) Loading