Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +37 −24 Original line number Diff line number Diff line Loading @@ -3853,8 +3853,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } if (isPip2ExperimentEnabled()) { // If PiP2 flag is on and request to enter PiP comes in, // we request a direct transition TRANSIT_PIP from Shell to get the right entry bounds. final Runnable enterPipRunnable = () -> { // If PiP2 flag is on and request to enter PiP comes in, we request a direct // transition TRANSIT_PIP from Shell to get the right entry bounds. // So PiP activity isn't moved to a pinned task until after // Shell calls back into Core with the entry bounds to be applied with startWCT. final Transition enterPipTransition = new Transition(TRANSIT_PIP, Loading @@ -3863,20 +3864,32 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { enterPipTransition.setPipActivity(r); r.mAutoEnteringPip = isAutoEnter; if (r.getTaskFragment() != null && r.getTaskFragment().isEmbeddedWithBoundsOverride() && enterPipTransition != null) { if (r.getTaskFragment() != null && r.getTaskFragment().isEmbeddedWithBoundsOverride()) { enterPipTransition.addFlag(FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY); } getTransitionController().startCollectOrQueue(enterPipTransition, (deferred) -> { mChainTracker.start("enterPip2", enterPipTransition); // Collecting PiP activity explicitly to avoid stopping PiP activity while Shell // handles the request; see task supervisor's processStoppingAndFinishingActivities. // Collecting PiP activity explicitly to avoid stopping PiP activity while // Shell handles the request; see task supervisor's // processStoppingAndFinishingActivities. enterPipTransition.collect(r); getTransitionController().requestStartTransition(enterPipTransition, r.getTask(), null /* remoteTransition */, null /* displayChange */); mChainTracker.end(); }); }; if (r.isKeyguardLocked()) { mActivityClientController.dismissKeyguard(r.token, new KeyguardDismissCallback() { @Override public void onDismissSucceeded() { enterPipRunnable.run(); } }, null /* message */); } else { enterPipRunnable.run(); } return true; } Loading Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +37 −24 Original line number Diff line number Diff line Loading @@ -3853,8 +3853,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } if (isPip2ExperimentEnabled()) { // If PiP2 flag is on and request to enter PiP comes in, // we request a direct transition TRANSIT_PIP from Shell to get the right entry bounds. final Runnable enterPipRunnable = () -> { // If PiP2 flag is on and request to enter PiP comes in, we request a direct // transition TRANSIT_PIP from Shell to get the right entry bounds. // So PiP activity isn't moved to a pinned task until after // Shell calls back into Core with the entry bounds to be applied with startWCT. final Transition enterPipTransition = new Transition(TRANSIT_PIP, Loading @@ -3863,20 +3864,32 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { enterPipTransition.setPipActivity(r); r.mAutoEnteringPip = isAutoEnter; if (r.getTaskFragment() != null && r.getTaskFragment().isEmbeddedWithBoundsOverride() && enterPipTransition != null) { if (r.getTaskFragment() != null && r.getTaskFragment().isEmbeddedWithBoundsOverride()) { enterPipTransition.addFlag(FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY); } getTransitionController().startCollectOrQueue(enterPipTransition, (deferred) -> { mChainTracker.start("enterPip2", enterPipTransition); // Collecting PiP activity explicitly to avoid stopping PiP activity while Shell // handles the request; see task supervisor's processStoppingAndFinishingActivities. // Collecting PiP activity explicitly to avoid stopping PiP activity while // Shell handles the request; see task supervisor's // processStoppingAndFinishingActivities. enterPipTransition.collect(r); getTransitionController().requestStartTransition(enterPipTransition, r.getTask(), null /* remoteTransition */, null /* displayChange */); mChainTracker.end(); }); }; if (r.isKeyguardLocked()) { mActivityClientController.dismissKeyguard(r.token, new KeyguardDismissCallback() { @Override public void onDismissSucceeded() { enterPipRunnable.run(); } }, null /* message */); } else { enterPipRunnable.run(); } return true; } Loading