File tree Expand file tree Collapse file tree
TMessagesProj/src/main/java/org/telegram Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6836,8 +6836,9 @@ public static void applyEdgeToEdgeLayoutParams(WindowManager.LayoutParams window
68366836
68376837
68386838 public static Insets getDefaultWindowInsets (WindowInsetsCompat insets , boolean withIme ) {
6839- final int insetsType = WindowInsetsCompat .Type .systemBars () | WindowInsetsCompat .Type .displayCutout ();
6840- final Insets systemInsets = insets .getInsetsIgnoringVisibility (insetsType );
6839+ final Insets cutoutInsets = insets .getInsetsIgnoringVisibility (WindowInsetsCompat .Type .displayCutout ());
6840+ final Insets systemBarsInsets = insets .getInsets (WindowInsetsCompat .Type .systemBars ());
6841+ final Insets systemInsets = Insets .max (cutoutInsets , systemBarsInsets );
68416842
68426843 if (withIme ) {
68436844 final Insets imeInsets = insets .getInsets (WindowInsetsCompat .Type .ime ());
Original file line number Diff line number Diff line change @@ -88,8 +88,9 @@ public void setInsets(@Nullable WindowInsetsCompat insets) {
8888 private void setInsets (@ Nullable WindowInsetsCompat insets , boolean animated ) {
8989 this .lastInsets = insets ;
9090
91- final int insetsType = WindowInsetsCompat .Type .systemBars () | WindowInsetsCompat .Type .displayCutout ();
92- final Insets systemInsets = insets != null ? insets .getInsetsIgnoringVisibility (insetsType ) : Insets .NONE ;
91+ final Insets cutoutInsets = insets != null ? insets .getInsetsIgnoringVisibility (WindowInsetsCompat .Type .displayCutout ()) : Insets .NONE ;
92+ final Insets systemBarsInsets = insets != null ? insets .getInsets (WindowInsetsCompat .Type .systemBars ()) : Insets .NONE ;
93+ final Insets systemInsets = Insets .max (cutoutInsets , systemBarsInsets );
9394 final Insets imeInsets = insets != null ? insets .getInsets (WindowInsetsCompat .Type .ime ()) : Insets .NONE ;
9495
9596 final KeyboardState .State oldKeyboardState = keyboardState .getState ();
You can’t perform that action at this time.
0 commit comments