WM: correctly draw the rounded corner / cutout overlay during rotation
When we freeze the screen, we really don't want the overlay to appear on the screenshot - otherwise this will lead to it rotating with the screen content. This means the overlay currently disappears during the transition. We cannot just draw it over the screenshot, because it might be in inconsistent state. We fix this by temporarily undoing the effects of the screen rotation transform on the overlay's window token. Then, once the window has performed relayout and is redrawn in the new orientation, we switch to that representation. This is mostly seamless rotation, with the difference that we force it always, and it must also work for 180 degree rotation (which regular seamless rotation does not). Also move the rounded corner overlay from the display overlay layer to the root of the hierarchy such that it can draw over the screen off animation's ColorLayer. Cherry picked from ag/4226061 Bug: 111504081 Test: Enable display cutout overlay, rotate phone to all orientations, ensure that emulated display cutout never flashes or disappears. Test: atest CoordinateTransformsTest Test: atest FlickerTests Change-Id: I8c538b4a5402560c63578c954e8ee7d371079d89
Loading
Please register or sign in to comment