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

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

Stop splitscreen from resizing to 50:50 unless it's a true launch adjacent

Adds a check for launch adjacent so that apps starting new activities within themselves don't cause a resize to 50:50. The 50:50 resize is only intended to happen for launch adjacent.

Fixes: 421272155
Flag: com.android.wm.shell.enable_flexible_two_app_split
Test: Manual
Change-Id: I0d7d1e1399be67eee7c8d8fc925702376734698e
parent 4d88d79b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3219,7 +3219,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    mSplitTransitions.setEnterTransition(transition, request.getRemoteTransition(),
                            TRANSIT_SPLIT_SCREEN_PAIR_OPEN, !mIsDropEnteringSplitInvisible,
                            SNAP_TO_2_50_50);
                } else if (enableFlexibleTwoAppSplit() && isSplitScreenVisible() && isOpening) {
                } else if (enableFlexibleTwoAppSplit() && isSplitScreenVisible() && isOpening
                        && requestHasLaunchAdjacentFlag(request)) {
                    // launching into an existing split stage; possibly launchAdjacent
                    // If we're replacing a pip-able app, we need to let mixed handler take care of
                    // it. Otherwise we'll just treat it as an enter+resize