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

Commit 30e59f71 authored by Omar Elmekkawy's avatar Omar Elmekkawy
Browse files

Resize windows on resolution or dpi changes in desktop windowing.

This CL introduces two new APIs to the DisplayController:
* onDisplayConfigurationChanged(displayId, newConfig, oldLayout) {}
Which notifies the listeners of a configuration change and sends the old layout as well, for listeners that care about the old layout to calculate the new window sizes as a ratio of DPI for example.

* onStableBoundsChanging(displayId, oldLayout) {}
Which notifies windows of stable bounds changing that happens when taskbar or statusbar changes size, this usually happens when the DPI or the resolution of the window changes.

Upon receiving the stable bounds changing and the configuration changed signal within the DisplayEventHandler, it kicks off the logic to resize all the tasks in DesktopMode for the current user to respect the new dpi or resolution.

Flag: com.android.window.flags.enable_display_disconnect_interaction
Test: on device testing and unit tests.
Bug: 412982009
Change-Id: I1eaede071c1e5e689f7282bd28caa22d14a8ea47
parent 118823d3
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