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

Skip to content
Commit 4c5947ed authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

Some fixes for performance

* Add @Immutable to some classes
* Use a QSTile.Icon instead of a Supplier in TileUiState to properly
  have equality. As this object is close to the UI, it makes no sense to
  have a supplier and complicate equality. However, this needs to be
  paired with proper QSTile.Icon (ResourceIcon and DrawableIconWithRes)
  to facilitate equality.
* Use produceState to obtain the TileUiState. Because `QSTile.State`
  doesn't have a good equality, and we only care about the uiState, use
  this to avoid recompositions when the legacy state changes but the ui
  state doesn't.
* Add key around Tile composables tied to the spec (identifies the
  tile).

Test: manual, perfetto trace. No recompositions of the tiles
Test: atest com.android.systemui.qs
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Bug: 383085298
Change-Id: I9a634cabbd1917ead1ced7f0b9fb968225194d24
parent 977e0679
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment