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

Skip to content
Commit 2a2e0d1b authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Set initial value of enabledDisplay to DEFAULT_DISPLAY

It seems some classes using DisplayRepository ask for displays immediately, before the first update that populates it with the default display. This was not a problem before, as we were using SharedFlows and the collector was just suspended until the first emission was output. However, as we're using StateFlows now, collectors were taking the initial emptySet and misbehaving (this was happening in code related to screenshot).

This might generate a binder call on the main thread to get the default Display, but chances are this will hit caches. It's tricky to move this to the background thread without changing the API and without using SharedFlows

Bug: 345472038
Test: DisplayRepositoryTest
Flag: com.android.systemui.enable_efficient_display_repository
Change-Id: I48aeabace323f8d68aa6de8e8fa530fc7656e755
parent 56cc8bef
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