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

Commit e729560d authored by Felix Stern's avatar Felix Stern
Browse files

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
parent e8ef6fa0
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