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

Commit 1c81ea51 authored by David Lin's avatar David Lin Committed by Android (Google) Code Review
Browse files

Merge "Disallow enter PiP when starting a split task" into 24D1-dev

parents 9502f05b 91b2ab82
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1871,8 +1871,14 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        }
        // Put BAL flags to avoid activity start aborted. Otherwise, flows like shortcut to split
        // will be canceled.
        ActivityOptions options = ActivityOptions.fromBundle(opts);
        opts.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED, true);
        opts.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION, 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());
    }

    void updateActivityOptions(Bundle opts, @SplitPosition int position) {