From ed3f2e3803ebe4a2681d5fe7c74c27d512be1415 Mon Sep 17 00:00:00 2001 From: Tiger Huang Date: Mon, 11 Apr 2022 17:53:21 +0800 Subject: [PATCH] Fix WindowInsets#getStableInsets WindowInsets#getStableInsets should return system bar insets as if system bars are visible, regardless of the window flags. Fix: 228807465 Test: See if a window with FLAG_LAYOUT_NO_LIMITS or FLAG_FULLSCREEN can receive all the system bar insets. Change-Id: Ib8fff5ba78c8f52141a048027821ef182d2f7992 --- core/java/android/view/WindowInsets.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java index ba3417980a3d5..1c6d93da092cb 100644 --- a/core/java/android/view/WindowInsets.java +++ b/core/java/android/view/WindowInsets.java @@ -675,7 +675,7 @@ public final class WindowInsets { @Deprecated @NonNull public Insets getStableInsets() { - return getInsets(mTypeMaxInsetsMap, mCompatInsetsTypes); + return getInsets(mTypeMaxInsetsMap, systemBars()); } /**