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

Commit c277a8e2 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Fix IME visibleTopInsets before showWindow

In [1] we started setting the IME's reported visibleTopInsets to 0
before we get a showWindow call. This was meant to set the IME source
visible frame as empty/null, and thus disallow user animations on it.
However, in [2] we reverted this to always allow (IME) insets sources to
be user-controllable, even when no insets are provided, to enable
controlling the alpha of the IME window for floating IME mode.

Moreover, setting the visibleTopInsets essentially signals that the
visibile insets providing frame of the IME stretches out to the top of
the decor view, which is incorrect. This approach worked as
InsetsSourceProvider#updateSourceFrame had a special case which set the
visibleFrame to null when the givenVisibleInsets are 0 on all sides.
However, this is brittle, as any other source of visible insets setting
a different side to a non-zero value can break this.

This removes setting the visibleTopInsets to 0, instead falling back
to the value from onComputeInsets, which would be the full decorView
height when called before showWindow, to signal that there are no
visible insets reported.

  [1]: Id70f59be7653beedc02d6c8bc3b1bd50a357f4fe
  [2]: I3210df9bcc087f5fba712e0e7ac4922475c3b88d

Flag: EXEMPT bugfix
Test: atest ImeInsetsControllerTest
Bug: 407043224
Change-Id: I320ecca9ef5d9c865d6add500a036a3ccd882aa9
parent bfe2c0c9
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