Update API availability of edge to edge (flutter/engine#28616)

This commit is contained in:
Kate Lovett
2021-09-14 17:14:23 -05:00
committed by GitHub
parent 14a2ca0722
commit 297946f1c1
2 changed files with 6 additions and 5 deletions

View File

@@ -290,13 +290,12 @@ public class PlatformPlugin {
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN;
} else if (systemUiMode == PlatformChannel.SystemUiMode.EDGE_TO_EDGE
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
&& Build.VERSION.SDK_INT >= 29) {
// EDGE TO EDGE
// Available starting at 16
// Available starting at 29
// SDK 29 and up will apply a translucent body scrim behind 2/3 button navigation bars
// to ensure contrast with buttons on the nav bar.
// SDK 28 and lower will support a transparent 2/3 button navigation bar.
// Overlays should be included and not removed.
// to ensure contrast with buttons on the nav and status bars, unless the contrast is not
// enforced in the overlay styling.
enabledOverlays =
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION

View File

@@ -233,7 +233,9 @@ public class PlatformPluginTest {
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN);
}
if (Build.VERSION.SDK_INT >= 29) {
platformPlugin.mPlatformMessageHandler.showSystemUiMode(
PlatformChannel.SystemUiMode.EDGE_TO_EDGE);
verify(fakeDecorView)