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
This commit is contained in:
Tiger Huang
2022-04-11 17:53:21 +08:00
parent bfccc9fdcd
commit ed3f2e3803

View File

@@ -675,7 +675,7 @@ public final class WindowInsets {
@Deprecated
@NonNull
public Insets getStableInsets() {
return getInsets(mTypeMaxInsetsMap, mCompatInsetsTypes);
return getInsets(mTypeMaxInsetsMap, systemBars());
}
/**