Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1de76a2a authored by Nergi Rahardi's avatar Nergi Rahardi
Browse files

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
parent e11a9396
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment