Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt +3 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import com.android.systemui.keyguard.ui.composable.elements.LockIconElementProvi import com.android.systemui.keyguard.ui.composable.elements.LockscreenElementFactoryImpl import com.android.systemui.keyguard.ui.composable.elements.LockscreenElementFactoryImpl.Companion.createRemembered import com.android.systemui.keyguard.ui.composable.elements.LockscreenLowerRegionElementProvider import com.android.systemui.keyguard.ui.composable.elements.LockscreenScopeImpl import com.android.systemui.keyguard.ui.composable.elements.LockscreenUpperRegionElementProvider import com.android.systemui.keyguard.ui.composable.elements.MediaElementProvider import com.android.systemui.keyguard.ui.composable.elements.NotificationStackElementProvider Loading Loading @@ -131,7 +132,8 @@ constructor( }, ) LockscreenSceneLayout(viewModel, elementFactory, elementContext) LockscreenScopeImpl(this@Content, elementFactory, elementContext) .LockscreenSceneLayout(viewModel) } } } packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/elements/AodNotificationIconsElementProvider.kt +4 −12 Original line number Diff line number Diff line Loading @@ -40,10 +40,9 @@ import com.android.systemui.common.ui.ConfigurationState import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElement import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementContext import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementFactory import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementProvider import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope import com.android.systemui.res.R import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.notification.icon.ui.viewbinder.AlwaysOnDisplayNotificationIconViewStore Loading Loading @@ -78,20 +77,13 @@ constructor( override val context = this@AodNotificationIconsElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { AodNotificationIcons(factory, context) override fun LockscreenScope<ElementContentScope>.LockscreenElement() { AodNotificationIcons() } } @Composable private fun ContentScope.AodNotificationIcons( factory: LockscreenElementFactory, context: LockscreenElementContext, modifier: Modifier = Modifier, ) { private fun LockscreenScope<ContentScope>.AodNotificationIcons(modifier: Modifier = Modifier) { val isVisible by keyguardRootViewModel.isNotifIconContainerVisible.collectAsStateWithLifecycle() val transitionState = remember { MutableTransitionState(isVisible.value) } Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/elements/AodPromotedNotificationAreaElementProvider.kt +5 −11 Original line number Diff line number Diff line Loading @@ -36,10 +36,9 @@ import com.android.systemui.compose.modifiers.sysuiResTag import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElement import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementContext import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementFactory import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementProvider import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.notification.promoted.AODPromotedNotification import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi Loading @@ -65,21 +64,16 @@ constructor( override val context = this@AodPromotedNotificationAreaElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { override fun LockscreenScope<ElementContentScope>.LockscreenElement() { if (PromotedNotificationUi.isEnabled) { AodPromotedNotificationArea(factory, context) AodPromotedNotificationArea() } } } @Composable private fun ContentScope.AodPromotedNotificationArea( factory: LockscreenElementFactory, context: LockscreenElementContext, modifier: Modifier = Modifier, private fun LockscreenScope<ContentScope>.AodPromotedNotificationArea( modifier: Modifier = Modifier ) { val isVisible by keyguardRootViewModel.isAodPromotedNotifVisible.collectAsStateWithLifecycle() Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/elements/ClockRegionElementProvider.kt +76 −90 Original line number Diff line number Diff line Loading @@ -36,12 +36,12 @@ import com.android.compose.modifiers.padding import com.android.systemui.customization.clocks.R as clocksR import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElement import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementContext import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementFactory import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys.Clock import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys.Smartspace import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementProvider import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope.Companion.LockscreenElement import com.android.systemui.res.R import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject Loading @@ -63,11 +63,7 @@ constructor( override val context = this@ClockRegionElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { with(factory) { override fun LockscreenScope<ElementContentScope>.LockscreenElement() { val shouldDateWeatherBeBelowSmallClock: Boolean by keyguardClockViewModel.shouldDateWeatherBeBelowSmallClock .collectAsStateWithLifecycle() Loading @@ -83,12 +79,11 @@ constructor( Modifier.padding(horizontal = xPadding) .padding(top = dimensionResource(R.dimen.keyguard_clock_top_margin)), ) { LockscreenElement(Clock.Small, context, Modifier) LockscreenElement(Clock.Small) if (!shouldDateWeatherBeBelowSmallClock) { LockscreenElement( Smartspace.DWA.SmallClock.Column, context, Modifier.padding( horizontal = dimensionResource(R.dimen.smartspace_padding_horizontal) Loading @@ -100,13 +95,11 @@ constructor( if (shouldDateWeatherBeBelowSmallClock) { LockscreenElement( Smartspace.DWA.SmallClock.Row, context, Modifier.padding(horizontal = xPadding), ) } LockscreenElement(Smartspace.Cards, context, Modifier) } LockscreenElement(Smartspace.Cards) } } } Loading @@ -116,11 +109,7 @@ constructor( override val context = this@ClockRegionElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { with(factory) { override fun LockscreenScope<ElementContentScope>.LockscreenElement() { val shouldDateWeatherBeBelowLargeClock: Boolean by keyguardClockViewModel.shouldDateWeatherBeBelowLargeClock .collectAsStateWithLifecycle() Loading @@ -144,14 +133,12 @@ constructor( if (!shouldDateWeatherBeBelowLargeClock) { LockscreenElement( Smartspace.DWA.LargeClock.Above, context, Modifier.padding(horizontal = xPadding), ) } LockscreenElement( Smartspace.Cards, context, // Always reserve space for smartspace cards, even if they're not // visible. This keeps the clock position stable when smartspace // enters/exits. Loading @@ -170,10 +157,9 @@ constructor( ), modifier = Modifier.padding(horizontal = xPadding).fillMaxWidth().weight(1f), ) { LockscreenElement(Clock.Large, context, Modifier) LockscreenElement(Clock.Large) if (shouldDateWeatherBeBelowLargeClock) { LockscreenElement(Smartspace.DWA.LargeClock.Below, context, Modifier) } LockscreenElement(Smartspace.DWA.LargeClock.Below) } } } Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/elements/IndicationAreaElementProvider.kt +2 −6 Original line number Diff line number Diff line Loading @@ -31,10 +31,9 @@ import com.android.systemui.keyguard.ui.binder.KeyguardIndicationAreaBinder import com.android.systemui.keyguard.ui.view.KeyguardIndicationArea import com.android.systemui.keyguard.ui.viewmodel.KeyguardIndicationAreaViewModel import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElement import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementContext import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementFactory import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementProvider import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.KeyguardIndicationController import javax.inject.Inject Loading @@ -55,10 +54,7 @@ constructor( override val context = this@IndicationAreaElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { override fun LockscreenScope<ElementContentScope>.LockscreenElement() { IndicationArea() } } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt +3 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import com.android.systemui.keyguard.ui.composable.elements.LockIconElementProvi import com.android.systemui.keyguard.ui.composable.elements.LockscreenElementFactoryImpl import com.android.systemui.keyguard.ui.composable.elements.LockscreenElementFactoryImpl.Companion.createRemembered import com.android.systemui.keyguard.ui.composable.elements.LockscreenLowerRegionElementProvider import com.android.systemui.keyguard.ui.composable.elements.LockscreenScopeImpl import com.android.systemui.keyguard.ui.composable.elements.LockscreenUpperRegionElementProvider import com.android.systemui.keyguard.ui.composable.elements.MediaElementProvider import com.android.systemui.keyguard.ui.composable.elements.NotificationStackElementProvider Loading Loading @@ -131,7 +132,8 @@ constructor( }, ) LockscreenSceneLayout(viewModel, elementFactory, elementContext) LockscreenScopeImpl(this@Content, elementFactory, elementContext) .LockscreenSceneLayout(viewModel) } } }
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/elements/AodNotificationIconsElementProvider.kt +4 −12 Original line number Diff line number Diff line Loading @@ -40,10 +40,9 @@ import com.android.systemui.common.ui.ConfigurationState import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElement import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementContext import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementFactory import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementProvider import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope import com.android.systemui.res.R import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.notification.icon.ui.viewbinder.AlwaysOnDisplayNotificationIconViewStore Loading Loading @@ -78,20 +77,13 @@ constructor( override val context = this@AodNotificationIconsElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { AodNotificationIcons(factory, context) override fun LockscreenScope<ElementContentScope>.LockscreenElement() { AodNotificationIcons() } } @Composable private fun ContentScope.AodNotificationIcons( factory: LockscreenElementFactory, context: LockscreenElementContext, modifier: Modifier = Modifier, ) { private fun LockscreenScope<ContentScope>.AodNotificationIcons(modifier: Modifier = Modifier) { val isVisible by keyguardRootViewModel.isNotifIconContainerVisible.collectAsStateWithLifecycle() val transitionState = remember { MutableTransitionState(isVisible.value) } Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/elements/AodPromotedNotificationAreaElementProvider.kt +5 −11 Original line number Diff line number Diff line Loading @@ -36,10 +36,9 @@ import com.android.systemui.compose.modifiers.sysuiResTag import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElement import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementContext import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementFactory import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementProvider import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.notification.promoted.AODPromotedNotification import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi Loading @@ -65,21 +64,16 @@ constructor( override val context = this@AodPromotedNotificationAreaElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { override fun LockscreenScope<ElementContentScope>.LockscreenElement() { if (PromotedNotificationUi.isEnabled) { AodPromotedNotificationArea(factory, context) AodPromotedNotificationArea() } } } @Composable private fun ContentScope.AodPromotedNotificationArea( factory: LockscreenElementFactory, context: LockscreenElementContext, modifier: Modifier = Modifier, private fun LockscreenScope<ContentScope>.AodPromotedNotificationArea( modifier: Modifier = Modifier ) { val isVisible by keyguardRootViewModel.isAodPromotedNotifVisible.collectAsStateWithLifecycle() Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/elements/ClockRegionElementProvider.kt +76 −90 Original line number Diff line number Diff line Loading @@ -36,12 +36,12 @@ import com.android.compose.modifiers.padding import com.android.systemui.customization.clocks.R as clocksR import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElement import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementContext import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementFactory import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys.Clock import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys.Smartspace import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementProvider import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope.Companion.LockscreenElement import com.android.systemui.res.R import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject Loading @@ -63,11 +63,7 @@ constructor( override val context = this@ClockRegionElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { with(factory) { override fun LockscreenScope<ElementContentScope>.LockscreenElement() { val shouldDateWeatherBeBelowSmallClock: Boolean by keyguardClockViewModel.shouldDateWeatherBeBelowSmallClock .collectAsStateWithLifecycle() Loading @@ -83,12 +79,11 @@ constructor( Modifier.padding(horizontal = xPadding) .padding(top = dimensionResource(R.dimen.keyguard_clock_top_margin)), ) { LockscreenElement(Clock.Small, context, Modifier) LockscreenElement(Clock.Small) if (!shouldDateWeatherBeBelowSmallClock) { LockscreenElement( Smartspace.DWA.SmallClock.Column, context, Modifier.padding( horizontal = dimensionResource(R.dimen.smartspace_padding_horizontal) Loading @@ -100,13 +95,11 @@ constructor( if (shouldDateWeatherBeBelowSmallClock) { LockscreenElement( Smartspace.DWA.SmallClock.Row, context, Modifier.padding(horizontal = xPadding), ) } LockscreenElement(Smartspace.Cards, context, Modifier) } LockscreenElement(Smartspace.Cards) } } } Loading @@ -116,11 +109,7 @@ constructor( override val context = this@ClockRegionElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { with(factory) { override fun LockscreenScope<ElementContentScope>.LockscreenElement() { val shouldDateWeatherBeBelowLargeClock: Boolean by keyguardClockViewModel.shouldDateWeatherBeBelowLargeClock .collectAsStateWithLifecycle() Loading @@ -144,14 +133,12 @@ constructor( if (!shouldDateWeatherBeBelowLargeClock) { LockscreenElement( Smartspace.DWA.LargeClock.Above, context, Modifier.padding(horizontal = xPadding), ) } LockscreenElement( Smartspace.Cards, context, // Always reserve space for smartspace cards, even if they're not // visible. This keeps the clock position stable when smartspace // enters/exits. Loading @@ -170,10 +157,9 @@ constructor( ), modifier = Modifier.padding(horizontal = xPadding).fillMaxWidth().weight(1f), ) { LockscreenElement(Clock.Large, context, Modifier) LockscreenElement(Clock.Large) if (shouldDateWeatherBeBelowLargeClock) { LockscreenElement(Smartspace.DWA.LargeClock.Below, context, Modifier) } LockscreenElement(Smartspace.DWA.LargeClock.Below) } } } Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/elements/IndicationAreaElementProvider.kt +2 −6 Original line number Diff line number Diff line Loading @@ -31,10 +31,9 @@ import com.android.systemui.keyguard.ui.binder.KeyguardIndicationAreaBinder import com.android.systemui.keyguard.ui.view.KeyguardIndicationArea import com.android.systemui.keyguard.ui.viewmodel.KeyguardIndicationAreaViewModel import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElement import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementContext import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementFactory import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementKeys import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenElementProvider import com.android.systemui.plugins.keyguard.ui.composable.elements.LockscreenScope import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.KeyguardIndicationController import javax.inject.Inject Loading @@ -55,10 +54,7 @@ constructor( override val context = this@IndicationAreaElementProvider.context @Composable override fun ElementContentScope.LockscreenElement( factory: LockscreenElementFactory, context: LockscreenElementContext, ) { override fun LockscreenScope<ElementContentScope>.LockscreenElement() { IndicationArea() } } Loading