feat(MM): Make MotionSpec declarative and state-driven (2/3)
This change refactors `MotionValue` to make its `MotionSpec` (animation
physics) derived from a reactive lambda, replacing the previous
imperative approach.
Previously, `MotionValue` had a mutable `spec` property that consumers
would update directly. This required imperative logic within consumers
(`motionValue.spec = ...`) which did not align well with Compose's
declarative, state-driven architecture.
The `MotionValue` constructor now accepts a `spec: () -> MotionSpec`
lambda. The value now automatically reacts to changes in any state read
within this lambda, making its behavior inherently declarative.
Test: Tested on the previous MotionValueTests
Bug: 428886057
Flag: com.android.systemui.scene_container
Change-Id: I8f1b29da698d6599edcd61d36108f005d21e706e
3 files changed