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

Commit 86860b8e authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

Disallow userLeaving when split drag drop

We should avoid setting mUserLeaving=true when
bringing task to front that disallow entering PiP
due to the launching task coming to front.

Bug: 336477473
Test: repro the steps in the bug report
Change-Id: I94377538ab922b2ca03f295a847a8b8e4d1904df
parent 5dd37854
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1519,7 +1519,10 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
        }

        try {
            if ((flags & ActivityManager.MOVE_TASK_NO_USER_ACTION) == 0) {
            // We allow enter PiP for previous front task if not requested otherwise via options.
            boolean shouldCauseEnterPip = options == null
                    || !options.disallowEnterPictureInPictureWhileLaunching();
            if ((flags & ActivityManager.MOVE_TASK_NO_USER_ACTION) == 0 && shouldCauseEnterPip) {
                mUserLeaving = true;
            }