Fix race in DisplayRepository tests

while on real devices tests were passing fine, on cuttlefish there were some flakes.

Those were because sometimes the "initial value" of enabledDisplayId was being propagated before or after the initial value of the "scan". When the "scan" initial value was propagated first, only the default display was in the output for the first event. When the StateIn initial value was propagated first, everything worked as expected.

Now the same initial value is provided to the scan and the sharein for enabledDisplayIds.

Also, cleaning up the flag (now in next)

Bug: 345472038
Bug: 358145460
Test: DisplayRepositoryTest
Flag: com.android.systemui.enable_efficient_display_repository
Change-Id: Ie1e64271d01936ee064f780b1a1f390b769cca31
2 files changed