summaryrefslogtreecommitdiff
path: root/ravenwood/scripts/extract-last-soong-commands.py
diff options
context:
space:
mode:
author Jeremy Sim <jeremysim@google.com> 2025-02-27 15:13:35 -0800
committer Jeremy Sim <jeremysim@google.com> 2025-02-28 15:27:50 -0800
commit04618610504e4fb2deb92f13ad97db8c8247bb27 (patch)
treeadcc2b411a923a1815f3ae45870249fafcc537f9 /ravenwood/scripts/extract-last-soong-commands.py
parentfc2d083585668c9b8f6c689cda1143c932802ecd (diff)
Fix unnecessary slide-up movement for IME in flex split
When IME is triggered in splitscreen, there is existing logic that translates the app surface up if the focused app is on the bottom of the screen. This helps the app content not be obscured by the IME. We also still want to keep the top app somewhat visible, so we cap the translation at the point where 30% of the top app is left visible. However, the existing calculation assumes that apps are fully onscreen, which is no longer true in the era of flexible split. This CL updates the calculation in `getTargetYOffset()` so that it works for offscreen apps as well as onscreen-only apps. The calculation logic was like this before: 1) we want to translate up the bottom app by x amount (desireOffset) 2) but theres a max we want to translate it by (0.7f of the size of the top app) (maxOffset) 3) so try to translate up by desireOffset, but stop at maxOffset Now it's like this: 1) we want to translate up the bottom app by x amount (desireOffset) 2) but theres a max we want to translate it by (*we still need 0.3f of the top app to be visible*) (maxOffset) 3) so try to translate up by desireOffset, but stop at maxOffset When the top app is fully onscreen, they are equivalent statements, but in flex split, the latter calculation returns the correct value. Fixes: 399727927 Flag: com.android.wm.shell.enable_flexible_two_app_split Test: Looks good when in 10:90 and activating IME. Change-Id: I082804c6ead48a2cc7ba193e3585310d0bcca005
Diffstat (limited to 'ravenwood/scripts/extract-last-soong-commands.py')
0 files changed, 0 insertions, 0 deletions