Handle display pane update from DisplayListener
In mirroring mode, DisplayTopology will only contain DEFAULT_DISPLAY, and hence, no more update will be sent even when a display is added / removed. To support this, DisplayTopologyPreference needs to listen from 2 sources: DisplayTopologyListener and DisplayListener. To handle overlapping updates, we should focus DisplayTopologyListener only to handle updates when mirroring mode or showStackingMirroring flag is off (to fallback to the existing impl when flag is off). Meanwhile, if mirroring mode and flag is on, it should rely on onDisplayUpdate to properly update displayPane. When switching from mirroring back to non-mirroring, it should update normally as `topologyInfo` has been set to null in the mirroring update handling. Recording: http://shortn/_1TMIECohGv Bug: 401059862 Test: atest DisplayBlockTest DisplayTopologyPreferenceTest Flag: com.android.settings.flags.show_stacked_mirroring_display_connected_display_setting Change-Id: Ie3c6caba02a16c79750dc05fb251b3ad854b432c
Loading
Please register or sign in to comment