diff options
| author | 2024-06-26 01:49:44 +0000 | |
|---|---|---|
| committer | 2024-07-11 00:26:13 +0000 | |
| commit | 696eb14f89de9d74d8c1522f90726f37ad228502 (patch) | |
| tree | 130cd8c65d42f574ef74c29d2427197b815fa7a3 /api/coverage/tools | |
| parent | 76d684eaebeec6dab2ba8343e68e3217a7ad29e6 (diff) | |
Update HandleMenu coordinates and tests
Updates HandleMenu position calculation so that:
1) AdditionalSystemViewContainer can take a global x,y position, whereas
before it needed pre-adjusted coordinates to adjust to default
Gravity.CENTER gravity of the LayoutParams. By changing the params'
gravity to TOP-LEFT, callers can send global (x,y) position without
additional adjustments.
2) Removed marginStart from x value of the HandleMenu position when in
fullscreen/split - as that is only intended for the freeform's menu
(to provide separation from the task edge). In fullscreen and split
this cause the menu to be slightly off-center.
3) Updated HandleMenuTests so:
- As a result of (1), expected position values use coordinates relative
to the display bounds, which is consistent with the test comments. So
there won't be expected negative values.
- Added resource overrides for width/height/margins, so that changing
the real resources don't cause the test to fail, nor changing the
device's density, which would resolve the real values (in dp) to
different than expected px.
- Updated flagged tests to use @EnableFlags, otherwise flagged tests
may not run in presubmit if the flag is disabled and are prone to
breaking.
Bug: 349464246
Test: atest HandleMenuTests
Flag: com.android.window.flags.enable_additional_windows_above_status_bar
Change-Id: Iffde19fa49cf0db097b9dd4abf504289f2af823d
Diffstat (limited to 'api/coverage/tools')
0 files changed, 0 insertions, 0 deletions