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

Commit bf7fe4a4 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Don't try to auto-pip if there's already a pip" into udc-dev

parents 46805d76 22b480c3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -954,6 +954,13 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
                // to the transient activity.
                ar.supportsEnterPipOnTaskSwitch = true;
            }
            // Make sure this activity can enter pip under the current circumstances.
            // `enterPictureInPicture` internally checks, but with beforeStopping=false which
            // is specifically for non-auto-enter.
            if (!ar.checkEnterPictureInPictureState("enterPictureInPictureMode",
                    true /* beforeStopping */)) {
                return false;
            }
            return mController.mAtm.enterPictureInPictureMode(ar, ar.pictureInPictureArgs,
                    false /* fromClient */);
        }
+6 −3
Original line number Diff line number Diff line
@@ -813,6 +813,10 @@ class TransitionController {
        }
        ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, "Finish Transition: %s", record);
        mPlayingTransitions.remove(record);
        if (!inTransition()) {
            // reset track-count now since shell-side is idle.
            mTrackCount = 0;
        }
        updateRunningRemoteAnimation(record, false /* isPlaying */);
        record.finishTransition();
        for (int i = mAnimatingExitWindows.size() - 1; i >= 0; i--) {
@@ -825,10 +829,9 @@ class TransitionController {
            }
        }
        mRunningLock.doNotifyLocked();
        // Run state-validation checks when no transitions are active anymore.
        // Run state-validation checks when no transitions are active anymore (Note: sometimes
        // finish can start a transition, so check afterwards -- eg. pip).
        if (!inTransition()) {
            // Can reset track-count now that everything is idle.
            mTrackCount = 0;
            validateStates();
            mAtm.mWindowManager.onAnimationFinished();
        }