Replace DisplayManager.getStableDisplaySize with max Display.Mode
The DisplayManager.getStableDisplaySize is not the right way to get the size we want for screen decorations and display team is going to get rid of it. Instead, we use the maximum display size supported by the display as the base size to define the cutout and rounded corner configs. Also fixed a bug that DisplayCutoutBaseView didn't update the shoudDrawCutout config when display change. Bug: 230227839 Test: 1. On foldable device, fold and unfold the device and check if the cutout is correctly drawn. 2. On device supporting multiple resolutions, switch resolution between FHD & QHD and check if the cutout is correctly drawn. Test: atest LocalDisplayAdapterTest DisplayCutoutTest ScreenDecorationsTest RoundedCornersTest DisplayCutoutBaseViewTest Change-Id: I7a602b5abd7d6a21d17eae4f8e99414eaf765fa5
Loading
Please register or sign in to comment