Support scaled cutout & roundedcorners when resolution is overridden
In current desgin, the confgis for cutout and rounded corner are based on the original display size. If the display resolution is overridden, cutous and rounded corners will be drawn in incorrect places with incorrect size. We should load the cutout & rounded corners with the orignal display size and then scale the results with the display ratio which is calculated by dividing current size with original size. Bug: 209592558 Test: manual: 1. Go Settings-> Display-> Screen Resolution 2. Switch between FHD+ and QHD+ 3. Check if the cutout and rounded corner looks the same as they are in the original display size. Test: manual: 1. adb shell wm size 1080x2340 2. Check if the cutout and rounded corner looks the same as they are in the original display size. Test: atest DisplayCutoutTest LocalDisplayAdapterTest ScreenDecorationsTest RoundedCornerResDelegateTest Change-Id: Iea42b73c0276b82983c1ddbce9455355afdc164d
Loading
Please register or sign in to comment