WM: Make maxAspectRatio work with display cutouts
Fixes an issue where the max aspect ratio was not correctly calculated if there was a display cutout. The issue was that the max aspect ratio logic assumed that nothing ever applies a top inset (n.b. the status bar is ignored for this inset). This is no longer true with display cutouts, which cut into the app bounds from the top. To make things work, we now need to grow the bounds for the app window by that inset. Later on, the top part will be trimmed again for the bounds reported to the app. Note that we cannot outright discard the top part, or colored bars would cease to work. Change-Id: I53925196a6a41736fc4748b12bbc3b8a9b0d174b Fixes: 80248462 Test: atest AspectRatioTests
Loading
Please register or sign in to comment