Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf5ce79e authored by burakov's avatar burakov Committed by Danny Burakov
Browse files

[Dual Shade] Improve insets calculation for the shade container.

It turns out that `WindowInsets.systemBarsIgnoringVisibility` was
returning 0 insets, because the status bar window is below the shade
window in terms of z-order. The reason a top padding was applied so far
on certain devices was thanks to `WindowInsets.displayCutout`, which
added a top padding to account for the camera cutout. On devices without
such a cutout however, no top inset padding was applied.

To workaround this issue, ag/33211544 added a forced padding based on a
dimension resource for the status bar height.

However, this CL removes that workaround and instead uses the more
robust `WindowInsets.safeContent` variant (that includes the status bar,
display cutout, and waterfall as previously calculated) and uses
the `windowInsetsPadding` modifier to apply them to the `Composable`,
instead of `padding`.

Fix: 391380435
Fix: 412969642
Test: Manually tested by observing the shade insets on a folded and
 unfolded device without a display cutout.
Flag: com.android.systemui.scene_container
Change-Id: I79cd6629570178de3e1b14d07b762b9b3d3bfc22
parent 7a9e9072
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment