Skip to content
Commit 0f7cc012 authored by Shawn Lin's avatar Shawn Lin
Browse files

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
parent e651a60d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment