+33
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Currently, CompatUIController is designed so that any app-compat UI change can be triggered with onCompatInfoChanged(). This can be done because all the information needed by CompatUIController is computed in WMCore. However, our new restart menu is implemented in window decoration, and requests the restart dialog via user action in the app handle menu. So we need a way for other WMShell components to trigger some UI changes in CompatUI. This change introduces CompatUIRequest. It meets the above requirement for the restart menu, while it's generic enough in case we may need to do something similar for other features in the future. The code pattern follows the existing CompatUIEvent, but it just defines the counterpart in the common request/event model. Note that, with this change, the restart dialog is allowed to be shown in desktop mode if isRestartMenuEnabledForDisplayMove() is true. Flag: com.android.window.flags.enable_restart_menu_for_connected_displays Bug: 400572022 Test: CompatUIControllerTest Change-Id: Id5f0ccd5ab0e9b1b6d76d20696d5b058ad168959