Merge "Fixed cutout not drawn when it's inside rounded corner rect" into tm-dev am: cc1d5178d2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17166623

Change-Id: If020d80a17d7bc71221d6b38ba22c694cc2a1580
This commit is contained in:
Shawn Lin
2022-03-15 02:45:40 +00:00
committed by Automerger Merge Worker

View File

@@ -119,9 +119,13 @@ class ScreenDecorHwcLayer(context: Context, displayDecorationSupport: DisplayDec
if (useInvertedAlphaColor) {
canvas.drawColor(bgColor)
}
// We may clear the color(if useInvertedAlphaColor is true) of the rounded corner rects
// before drawing rounded corners. If the cutout happens to be inside one of these rects, it
// will be cleared, so we have to draw rounded corners before cutout.
drawRoundedCorners(canvas)
// Cutouts are drawn in DisplayCutoutBaseView.onDraw()
super.onDraw(canvas)
drawRoundedCorners(canvas)
debugTransparentRegionPaint?.let {
calculateTransparentRect()