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

Commit a19699ea authored by Jerry Chang's avatar Jerry Chang
Browse files

Fix dragging the same app over a split app dismisses the split

Do not evict splitting children if the app start animation was canceled.
So it won't apply the evict transaction which empties the split.

Fix: 219139163
Test: manual check dropping the same app on the same side of the split
      won't dismiss the split.
Change-Id: I5a450e53d857813f4fd59ab157be7d36985673ea
parent e4297308
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -349,17 +349,20 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
                    RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
                    IRemoteAnimationFinishedCallback finishedCallback,
                    SurfaceControl.Transaction t) {
                mStageCoordinator.updateSurfaceBounds(null /* layout */, t);
                if (apps == null || apps.length == 0) {
                    // Do nothing when the animation was cancelled.
                    t.apply();
                    return;
                }

                if (apps != null) {
                mStageCoordinator.updateSurfaceBounds(null /* layout */, t);
                for (int i = 0; i < apps.length; ++i) {
                    if (apps[i].mode == MODE_OPENING) {
                        t.show(apps[i].leash);
                    }
                }
                }

                t.apply();

                if (finishedCallback != null) {
                    try {
                        finishedCallback.onAnimationFinished();