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

Commit c46fae34 authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

Disallow enter PiP when starting a split task

Disallow enter PiP while Launching another task
into one of split stage tasks.

This should also help Core keep
ActivityTaskSupervisor#mUserLeaving as false,
which helps avoid onUserLeaveHint() on client-side
and any legacy enter-PiP requests.

Bug: 336477473
Test: repro the steps in the bug (latest comments)

Change-Id: Idceebc9742f45d17ebe5398df2c151085d33c775
parent 48459cba
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1893,6 +1893,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        // will be canceled.
        options.setPendingIntentBackgroundActivityStartMode(MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
        options.setPendingIntentBackgroundActivityLaunchAllowedByPermission(true);

        // TODO (b/336477473): Disallow enter PiP when launching a task in split by default;
        //                     this might have to be changed as more split-to-pip cujs are defined.
        options.setDisallowEnterPictureInPictureWhileLaunching(true);
        opts.putAll(options.toBundle());
    }