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

Commit 1b9b7b46 authored by Matthew DeVore's avatar Matthew DeVore
Browse files

DisplayTopology: use correct layout listener

The GlobalLayoutListener was not being informed of the pane's size
change at the correct time. It was causing a paneless UI to flash very
briefly when opening the ExternalDisplayPreferenceFragment. This was
hard to see in most situations, but when replacing the fragment with
a new ExternalDisplayPreferenceFragment it became very obvious (this
may be necessary to implement b/409354332).

We also got informed twice, because the resize of the pane when creating
a new TopologyScale caused a new notification. This made us need a
flag to indicate whether refresh was necessary. Instead, we use the
old/new values in the OnLayoutListener to decide if the scale needs to
be reconstructed.

Flag: com.android.settings.flags.display_topology_pane_in_display_list
Bug: b/400934884
Bug: b/409354332
Test: verify with a Log call that refreshPane is called ONCE when opening the fragment
Test: verify with a Log call that refreshPane is called ONCE when changing width of fragment
Change-Id: Ibde4efae2d72d18c49535e75b00a13d6fc07a75e
parent 6dc042d6
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