Skip to content

Commit

Permalink
Automated g4 rollback of changelist 452075757
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 452112331
  • Loading branch information
drchen authored and pekingme committed May 31, 2022
1 parent 072578d commit a9a57af
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,12 @@ public void onAttachedToWindow() {
if (coordinator != null) {
coordinator.setFitsSystemWindows(!drawEdgeToEdge);
}
WindowCompat.setDecorFitsSystemWindows(window, !drawEdgeToEdge);
if (drawEdgeToEdge) {
// Automatically set up edge to edge flags if we should be drawing edge to edge.
int edgeToEdgeFlags =
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
window.getDecorView().setSystemUiVisibility(edgeToEdgeFlags);
}
}
if (edgeToEdgeCallback != null) {
edgeToEdgeCallback.setWindow(window);
Expand Down

0 comments on commit a9a57af

Please sign in to comment.