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

Skip to content
Commit 6deed656 authored by Fabián Kozynski's avatar Fabián Kozynski
Browse files

[Flexiglass] Fix QS AndroidView

This CL fixes two things:

* After introducing collectAsStateWithLifecycle with a null default
  value for the view, this was causing the view (and a new QSImpl) to be
  created every time the shade was opened (because the lifecycle was
  started again). Instead, convert it into a StateFlow (as it should
  keep it's state beyond the composition) and use the collection without
  default.
* After moving unsquishing to be a lambda, this lambda does not change
  when the animation change (only the returned value), this was cauing
  the StateFlow<State> in QSSceneAdapterImpl to conflate those values so
  the animation was not working. Instead, make those types of State to
  not be data classes so they are not conflated.

Also, fix a leak where tiles were being re-added to a destroyed
QSPanelControllerBase because the view was momentarily attached. After
the controller is destroyed, no tiles should be added. We can't handle
that in detach (as we used to before scene container) because the scene
container may attach and detach the container AndroidView throughout its
lifetime.

Test: atest QSSceneAdapterImpl QSSceneAdapter
Test: atest QSPanelControllerBaseTest
Test: manual, expand shade and QS in regular and split shade
Flag: com.android.systemui.scene_container
Fixes: 341938306

Change-Id: Ia12f46546a7aa3dccb24e1be369895dfc9f1f67b
parent 16bde21c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment