Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 017b6b94 authored by Felix Stern's avatar Felix Stern
Browse files

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
parent a410f754
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment