Hold StateFlow for focusedDisplayId in ScreenshotProxyService
This CL changes ScreenshotProxyService to hold the StateFlow for focusedDisplayId rather than accessing it on-demand. As FocusedDisplayRepository#focusedDisplayId is not a StateFlow but its getter generates new StateFlow from the original cold flow, it’s not supposed to be inlined, which results in returning the default value before the cold flow emits the correct value. Bug: 399644508 Flag: com.android.window.flags.enable_display_focus_in_shell_transitions Flag: com.android.systemui.screenshot_multidisplay_focus_change Test: manual - connect an external display and screenshot Change-Id: Id72c4ae2cc673980915ac77aff3c3aea97956367
Loading
Please register or sign in to comment