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

Commit a894adaa authored by Jeremy Sim's avatar Jeremy Sim
Browse files

Fix bug with 90:10 snapping to 70:30 on rotation

This happens on certain devices when insets are large. Previously, when rotating, the device, we relied on the int position of the divider to help us find the new snap position. However, this could sometimes result in snapping to the wrong snap point -- e.g. a 90% snap point snapping to a 70% snap point when insets were larger in the new orientation.

Fixed by changing several things:
- In flexible split mode, when offscreen ratios are permitted, there will now always be a 10%, 33%, 50%, 66%, and 90% snap point. We will size up the 33% and 66% app a little if the app would otherwise be too small. This was discussed in UX -- in flex split we no longer want to delete the 33% snap point when the screen is too small. (Behavior will remain the same for legacy non-flex split).
- On rotation, initDividerPosition() now tries to match the old SnapPosition if it can, rather than relying on the position only. It will still fall back to the old behavior if this fails.
- SplitState is now updated when initDividerPosition() is called (previously had a subtle bug where the SnapPosition could change on rotation but SplitState was not updated).

Fixes: 420545909
Flag: com.android.wm.shell.enable_flexible_two_app_split
Test: Manual test with affected devices
Change-Id: I80ddad20f859073fab29b48ec4926c0b7a279a37
parent 84512d9b
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