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

Commit 04620e84 authored by Ikram Gabiyev's avatar Ikram Gabiyev Committed by Android (Google) Code Review
Browse files

Merge "Check AR state upon enter PiP collect" into main

parents 6bd3929f 375e47cf
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4183,6 +4183,15 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                }

                getTransitionController().startCollectOrQueue(enterPipTransition, (deferred) -> {
                    if (deferred && !r.checkEnterPictureInPictureState(
                            "enterPictureInPictureMode-collect", false /* beforeStopping */)) {
                        // If the transition was queued to collect, it is possible the PiP candidate
                        // activity isn't in a proper state to enter PiP anymore, so double check.
                        Slog.w(TAG, "PiP candidate activity in invalid state on transit collect");
                        enterPipTransition.abort();
                        return;
                    }

                    mChainTracker.start("enterPip2", enterPipTransition);
                    // Collecting PiP activity explicitly to avoid stopping PiP activity while
                    // Shell handles the request; see task supervisor's