Skip to content
Commit 2b0dcb3f authored by Adrian Roos's avatar Adrian Roos
Browse files

DisplayCutout: Only dispatch to apps requesting it

Fixes a compatibility issues, where apps that were not expecting
a cutout were dispatched one anyway, which caused the WindowInsets
dispatch to continue down the hierarchy even though the SystemInsets
were consumed by the app.

To avoid this, we pre-emptively consume the cutout for any apps that
did not request to be laid out in the cutout area. This is safe,
because for apps that don't request it, the status bar will take care
of consuming it, or they won't be laid out in the cutout at all.

If apps still need to know where the cutout is, they can query for it
via View.getRootWindowInsets().

Fixes: 65689439
Bug: 70490585
Test: atest android.view.cts.DisplayCutoutTest
Change-Id: If06674c619f095d4105be1b3a511fb5823b63d2b
parent 0b62766d
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