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

Commit a9fe57cf authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Do not auto-pip on launching translucent activity" into tm-qpr-dev am:...

Merge "Do not auto-pip on launching translucent activity" into tm-qpr-dev am: 9a82d5f6 am: e4971451

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19957920



Change-Id: I85dbe02240b1bea320fa7ab3430e6553b7509b9e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ed882610 e4971451
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1595,12 +1595,14 @@ class TaskFragment extends WindowContainer<WindowContainer> {
        boolean pauseImmediately = false;
        boolean shouldAutoPip = false;
        if (resuming != null) {
            // We do not want to trigger auto-PiP upon launch of a translucent activity.
            final boolean resumingOccludesParent = resuming.occludesParent();
            // Resuming the new resume activity only if the previous activity can't go into Pip
            // since we want to give Pip activities a chance to enter Pip before resuming the
            // next activity.
            final boolean lastResumedCanPip = prev.checkEnterPictureInPictureState(
                    "shouldAutoPipWhilePausing", userLeaving);
            if (userLeaving && lastResumedCanPip
            if (userLeaving && resumingOccludesParent && lastResumedCanPip
                    && prev.pictureInPictureArgs.isAutoEnterEnabled()) {
                shouldAutoPip = true;
            } else if (!lastResumedCanPip) {