+15
−39
mechanics/compose/src/com/android/mechanics/compose/modifier/VerticalTactileSurfaceRevealModifier.kt
+9
−16
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
This change refactors `VerticalFadeContentRevealModifier`, `VerticalTactileSurfaceRevealModifier`, and `overscrollToDismiss` to simplify their APIs and improve encapsulation. Previously, these modifiers required callers to manually create and pass a `MotionBuilderContext`. This added boilerplate to the call sites and coupled the implementation to the consumer. By implementing `CompositionLocalConsumerModifierNode`, the underlying nodes can now read dependencies like `LocalDensity` and `LocalMotionScheme` directly from composition locals. The primary changes are: - The modifier nodes now implement `CompositionLocalConsumerModifierNode` to resolve their own dependencies. - The `motionBuilderContext` parameter has been removed from the public modifier functions, resulting in a cleaner API. Test: Manually tested in the demo app Bug: 392535471 Flag: com.android.systemui.scene_container Change-Id: Ib343a1a08ed708e1922c2c2e1e0b5d10c6358b95