Update the server visibility before layout
With the change in [1], we only set server visibility for the IME, when it is actually drawn and store the last drawn state of the IME. If it is currently not drawn (rotation), server visibility will be reset. However, the insets should be dispatched after the IME became (server) visible. To avoid a 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]: Ifc0d345633b1aede56cf9ca8b2517c051e7359c6 Fix: 420218955 Fix: 425538294 Test: atest ImeInsetsSourceProviderTest#testOnPreLayout_resetServerVisibilityWhenImeIsNotDrawn Test: atest com.android.server.wm.DisplayPolicyLayoutTests Test: atest KeyboardVisibilityControlTest#testDialogPositionChangedAfterImeIsShown Flag: EXEMPT Bugfix Change-Id: I857a52e4cc01b59133f5be437305e8fb68a8e54a
Loading
Please register or sign in to comment