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

Commit 859e3323 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Break split on any non-active change where tasks aren't all TO_FRONT or TO_BACK

* The previous fix here (ag/31195717) regressed the original
issue where calculator and another app is open in unfolded and user
folds the device and only calculator shows up w/ half a black screen.
* Shell transitions gives us a WAKE transition in the case where we
remain unfolded and just lock/unlock the device but doesn't do so
when we fold the device. We can't specifically rely on the WAKE check.
* Now whenever split is already active, if the stages in the animation
aren't all TO_FRONT or TO_BACK we'll break split.

Test: lock/unlock case w/ calculator correctly breaks split +
fold case w/ calculator breaks split. Tried opening a link from Gmail
to ensure one stage where nothing changes and where another stage changes
doesn't break split
Flag: EXEMPT bug fix
Fixes: 387227528

Change-Id: Ib7d1a5a251af0951e8bbbab63aff81c793981f12
parent e87ed4e2
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -3097,7 +3097,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    // we'll break split
                    closingSplitTaskId = taskId;
                }
                if (transitType == WindowManager.TRANSIT_WAKE) {
                // Record which stages are receiving which changes
                if ((change.getMode() == TRANSIT_TO_BACK
                        || change.getMode() == TRANSIT_TO_FRONT)
@@ -3106,7 +3105,6 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    stageChanges.put(getStageOfTask(taskId), change.getMode());
                }
            }
            }

            if (pipChange != null) {
                TransitionInfo.Change pipReplacingChange = getPipReplacingChange(info, pipChange,