summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Nicolo' Mazzucato <nicomazz@google.com> 2024-06-19 13:32:58 +0000
committer Nicolo' Mazzucato <nicomazz@google.com> 2024-06-19 13:34:56 +0000
commit2a2e0d1b8318cb1f0ea2508dc4b924f74300b367 (patch)
tree1755e7148d6bc98f0272ae280be38b35ec22d83d /libs/androidfw/StringPool.cpp
parent56cc8bef4aef584783cfba82b234803b4d597709 (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions