Loading
Annotate MotionValue properties with @FrequentlyChangingValue
This change adds the `@FrequentlyChangingValue` annotation to all properties of `MotionValue` that update at a high frequency (e.g., on every frame). `MotionValue` properties like `.output`, `.isStable`, and `.segmentKey` are derived from continuous sources like user input. Reading these values directly within a composable function creates a state dependency that triggers recomposition on every update, leading to significant performance issues and UI jank. By annotating these properties, we provide a clear signal to the tooling and developers about their volatile nature. This will trigger a lint warning when these properties are read during composition, guiding developers to avoid this anti-pattern and instead pass the `MotionValue` instance directly to modifiers. This approach was chosen over alternatives like `derivedStateOf()`, which was previously found to have its own unacceptable performance overhead for this specific use case. Test: Manually verified lint warnings appear when reading annotated properties in a Composable. Bug: 441041846 Flag: com.android.systemui.scene_container Change-Id: Ib455a53ed5c4d7f0c459448f661c29cd33c28472