Update the server visibility before layout
The changes in [1] were making sure that another layout traversal takes place, if the IME was not drawn before, but is now drawn. To address the redundant window layout, this CL introduces `onPreLayout`, which sets the serverVisibility. As we need the previous visibility state in the ImeInsetsSourceProvider to reset the statsToken if needed, we store it as well. [1]: Ibbc76dc7f3963e6c2fa1b7f15208fc69b2c8e1b5 Bug: 427863960 Bug: 427117834 Test: atest ImeInsetsSourceProviderTest#testOnPreLayout_resetServerVisibilityWhenImeIsNotDrawn Test: atest com.android.server.wm.DisplayPolicyLayoutTests Test: atest KeyboardVisibilityControlTest#testDialogPositionChangedAfterImeIsShown Flag: android.view.inputmethod.set_server_visibility_onprelayout Change-Id: I314d6d445a5aa1c8fab73689b259239dccc6f629
Loading
Please register or sign in to comment