Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01f83451 authored by Hawkwood's avatar Hawkwood
Browse files

Minor changes to support weather clock centering

Bug: 441722102
Test: Checked weather clock
Flag: com.android.systemui.scene_container
Change-Id: Ib6e8d1f9353e087e21a20027ad2979ee60c94dbd
parent 307fb70b
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -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
@@ -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)
    }
}
+19 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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)