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

Skip to content
Commit d635960c authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Propagate shade config changes from WindowContext ComponentCallback

When all the following are true:
- the shade window uses a WindowContext (so, com.android.systemui.shade_window_goes_around is on)
- The device is a foldable device
- The device state has been changed (e.g. from folded to unfolded or vice-versa)

The shade root view ends up receiving the wrong configuration (due to
b/394527409), as the configuration is sent before resources associated
with the window context are updated, resulting in it being the config
for the old display (e.g. after folding, the config received will still
be the one for the unfolded display)

This cl works around the issue by propagating the configuration from
WindowContext ComponentsCallback, which is guaranteed to propagate the
correct configuration after resources are updated.

This approach will fix the behaviour of all classes using
ConfigurationController/ConfigurationState/ConfigurationRepository, but
it doesn't fix the  issue of each View#onConfigurationChanged being
wrong after an unfold, that will be addressed as part of b/394527409.

Bug: 362719719
Bug: 391929792
Bug: 394527409
Test: ShadeDisplaysInteractorTest, NotificationShadeWindowViewTest, fold/unfold with flag on
Flag: com.android.systemui.shade_window_goes_around
Change-Id: I5fd86e5336ff17a0f9ce1ea1e2c99c4a1529cd3d
parent a708b619
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