summaryrefslogtreecommitdiff
path: root/api/coverage/tools
diff options
context:
space:
mode:
author Tiger <tigerhuang@google.com> 2024-01-18 21:39:06 +0800
committer Tiger <tigerhuang@google.com> 2024-01-24 21:31:04 +0800
commit98f87e7d9fdcb2042009da2324a93807fb64ce42 (patch)
treed6190e17e9952688619f81e3c1f84836162f42d7 /api/coverage/tools
parente53175bcd578ba56b808605618f971a85e44336d (diff)
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
Diffstat (limited to 'api/coverage/tools')
0 files changed, 0 insertions, 0 deletions