Optimize Compose QS recompositions (1/2)
This CL optimizes the Compose QS recompositions by: 1. Making sure that Modifier.bounceable() and Modifier.sysuiResTag() do not invalidate a Modifier chain whenever they are recomposed. 2. Initializing the power button by the current value it should have rather than null. This prevents the composition of the power button to happen on the 2nd or 3rd frame when transitioning from QQS to QS. 3. Ensuring that the brightness slider does not recompose once its icon is available. 4. Ensuring that the build number does not recompose on 2nd or 3rd frame by caching its last value accross recompositions in a StateFlow inside the associated interactor. 5. Annotating a bunch of stable generic classes with @Stable. Bug: 389985793 Test: Manual, observed the difference of recompositions in Perfetto and go/hsv Flag: com.android.systemui.qs_ui_refactor_compose_fragment Change-Id: I55186bb14630f1a41999ecc2773f6bfcf64eb05a
Loading
Please register or sign in to comment