Fix race condition in screenshot code with multiple displays
DisplayRepository.displays flow was initialized as an empty set at first when converted to a StateFlow. Now it is a SharedFlow without any initial values: consumers of the flow will have to wait to get the first value. As the replay number is equal to 1 and onStart emits an event, everyone collecting the flow will have something immediately and not starve. Fixes: 306680094 Test: TakeScreenshotExecutorTest, DisplayRepositoryTest Change-Id: I6ac7f3d6aa31f7f3fff4a5691a51bf8db33021df
Loading
Please register or sign in to comment