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
Loading
Please register or sign in to comment