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

Skip to content
Commit 98f87e7d authored by Tiger's avatar Tiger
Browse files

Add mSideHint to InsetsSource

When calculating insets, if the relative frame is fully covered by the
insets source frame, we provided the insets to the top side previously.
That could be an unexpected side. For example, IME might expect the
navigation bar at the bottom as well as the IME caption bar. If IME
receives navigation bar insets from the opposite side, IME might add
wrong paddings to the top, and then cause the layout unstable.

This CLs introduces a new field: InsetsSource#mSideHint. It is used to
decide which side of the relative frame should receive insets when the
frame fully covers the relative frame. It is based on the insets
provided to the containing bounds.

This CL also refactors the InternalInsetsSide:
- It is moved from InsetsState to InsetsSource because InsetsState is
  like a container of InsetsSource, so InsetsState doesn't have to be
  known by InsetsSource.
- The prefix "ISIDE_" are renamed to "SIDE_" by dropping the "I".
- ISIDE_FLOATING is renamed to SIDE_NONE to reflect the truth.
- Rearrange the value of each constant.

Fix: 306114031
Bug: 320325449
Test: InsetsStateTest SizeCompatTests WindowInsetsAnimationImeTests
Change-Id: I7210fc38b70742ca2e45810641ab44c62dc589c8
parent e53175bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment