Loading packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/utils/ContentScopeUtils.kt +22 −0 Original line number Diff line number Diff line Loading @@ -18,7 +18,11 @@ import androidx.compose.foundation.layout.BoxScope import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import com.android.compose.animation.scene.BaseContentScope import com.android.compose.animation.scene.ElementContentScope import com.android.compose.animation.scene.ElementKey import com.android.compose.animation.scene.ElementScope import com.android.compose.animation.scene.MovableElementContentScope import com.android.compose.animation.scene.MovableElementKey object ContentScopeUtils { @Composable Loading @@ -26,4 +30,22 @@ object ContentScopeUtils { fun BaseContentScope.Element(key: ElementKey, content: @Composable BoxScope.() -> Unit) { Element(key, Modifier, content) } @Composable /** Convenience method for building an element w/ the default Modifier */ fun BaseContentScope.ElementWithValues( key: ElementKey, content: @Composable (ElementScope<ElementContentScope>.() -> Unit), ) { ElementWithValues(key, Modifier, content) } @Composable /** Convenience method for building a movable element w/ the default Modifier */ fun BaseContentScope.MovableElement( key: MovableElementKey, content: @Composable ElementScope<MovableElementContentScope>.() -> Unit, ) { MovableElement(key, Modifier, content) } } packages/SystemUI/customization/proguard_customization.flags +19 −0 Original line number Diff line number Diff line Loading @@ -116,11 +116,30 @@ *** *init*(...); } -keep class com.android.compose.animation.scene.MovableElementKey { *** *init*(...); } -keep class com.android.compose.animation.scene.ElementScope { *; } -keep class androidx.compose.runtime.internal.ComposableLambdaKt { *** rememberComposableLambda(...); *** composableLambdaInstance(...); } -keep class androidx.compose.foundation.layout.IntrinsicKt { *** height(...); *** width(...); } -keep class androidx.compose.ui.layout.MeasureScope { *** layout*$default(...); } -keep class androidx.compose.ui.layout.Placeable$PlacementScope { *** placeRelative*$default(...); } -keep class androidx.compose.ui.unit.Constraints { *** copy-*$default(...); } No newline at end of file packages/SystemUI/plugin/src/com/android/systemui/plugins/keyguard/ui/composable/elements/LockscreenKeys.kt +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ object LockscreenElementKeys { * typically needed when an AndroidView needs to animate between two of our subscenes, but two * copies of the wrapped view cannot be created at the same time. */ private val ContentPicker = val ContentPicker = with(LockscreenSceneKeys) { DefaultElementContentPicker( contents = setOf(Lockscreen, CenteredClockScene, TwoColumnScene) Loading Loading
packages/SystemUI/customization/clocks/common/src/com/android/systemui/customization/clocks/utils/ContentScopeUtils.kt +22 −0 Original line number Diff line number Diff line Loading @@ -18,7 +18,11 @@ import androidx.compose.foundation.layout.BoxScope import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import com.android.compose.animation.scene.BaseContentScope import com.android.compose.animation.scene.ElementContentScope import com.android.compose.animation.scene.ElementKey import com.android.compose.animation.scene.ElementScope import com.android.compose.animation.scene.MovableElementContentScope import com.android.compose.animation.scene.MovableElementKey object ContentScopeUtils { @Composable Loading @@ -26,4 +30,22 @@ object ContentScopeUtils { fun BaseContentScope.Element(key: ElementKey, content: @Composable BoxScope.() -> Unit) { Element(key, Modifier, content) } @Composable /** Convenience method for building an element w/ the default Modifier */ fun BaseContentScope.ElementWithValues( key: ElementKey, content: @Composable (ElementScope<ElementContentScope>.() -> Unit), ) { ElementWithValues(key, Modifier, content) } @Composable /** Convenience method for building a movable element w/ the default Modifier */ fun BaseContentScope.MovableElement( key: MovableElementKey, content: @Composable ElementScope<MovableElementContentScope>.() -> Unit, ) { MovableElement(key, Modifier, content) } }
packages/SystemUI/customization/proguard_customization.flags +19 −0 Original line number Diff line number Diff line Loading @@ -116,11 +116,30 @@ *** *init*(...); } -keep class com.android.compose.animation.scene.MovableElementKey { *** *init*(...); } -keep class com.android.compose.animation.scene.ElementScope { *; } -keep class androidx.compose.runtime.internal.ComposableLambdaKt { *** rememberComposableLambda(...); *** composableLambdaInstance(...); } -keep class androidx.compose.foundation.layout.IntrinsicKt { *** height(...); *** width(...); } -keep class androidx.compose.ui.layout.MeasureScope { *** layout*$default(...); } -keep class androidx.compose.ui.layout.Placeable$PlacementScope { *** placeRelative*$default(...); } -keep class androidx.compose.ui.unit.Constraints { *** copy-*$default(...); } No newline at end of file
packages/SystemUI/plugin/src/com/android/systemui/plugins/keyguard/ui/composable/elements/LockscreenKeys.kt +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ object LockscreenElementKeys { * typically needed when an AndroidView needs to animate between two of our subscenes, but two * copies of the wrapped view cannot be created at the same time. */ private val ContentPicker = val ContentPicker = with(LockscreenSceneKeys) { DefaultElementContentPicker( contents = setOf(Lockscreen, CenteredClockScene, TwoColumnScene) Loading