Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +11 −0 Original line number Diff line number Diff line Loading @@ -597,6 +597,17 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener, return; } if (mPipTransitionState.isEnteringPip() && !mPipTransitionState.getInSwipePipToHomeTransition()) { // If we are still entering PiP with Shell playing enter animation, jump-cut to // the end of the enter animation and reschedule exitPip to run after enter-PiP // has finished its transition and allowed the client to draw in PiP mode. mPipTransitionController.end(() -> { exitPip(animationDurationMs, requestEnterSplit); }); return; } ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE, "exitPip: %s, state=%s", mTaskInfo.topActivity, mPipTransitionState); final WindowContainerTransaction wct = new WindowContainerTransaction(); Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +10 −4 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import static com.android.wm.shell.transition.Transitions.TRANSIT_EXIT_PIP; import static com.android.wm.shell.transition.Transitions.TRANSIT_EXIT_PIP_TO_SPLIT; import static com.android.wm.shell.transition.Transitions.TRANSIT_REMOVE_PIP; import android.animation.Animator; import android.annotation.IntDef; import android.app.ActivityManager; import android.app.TaskInfo; Loading Loading @@ -348,9 +347,16 @@ public class PipTransition extends PipTransitionController { @Override public void end() { Animator animator = mPipAnimationController.getCurrentAnimator(); if (animator != null && animator.isRunning()) { animator.end(); end(null); } @Override public void end(@Nullable Runnable onTransitionEnd) { if (mPipAnimationController.isAnimating()) { mPipAnimationController.getCurrentAnimator().end(); } if (onTransitionEnd != null) { onTransitionEnd.run(); } } Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java +8 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,14 @@ public abstract class PipTransitionController implements Transitions.TransitionH public void end() { } /** * End the currently-playing PiP animation. * * @param onTransitionEnd callback to run upon finishing the playing transition. */ public void end(@Nullable Runnable onTransitionEnd) { } /** Starts the {@link android.window.SystemPerformanceHinter.HighPerfSession}. */ public void startHighPerfSession() {} Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +11 −0 Original line number Diff line number Diff line Loading @@ -597,6 +597,17 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener, return; } if (mPipTransitionState.isEnteringPip() && !mPipTransitionState.getInSwipePipToHomeTransition()) { // If we are still entering PiP with Shell playing enter animation, jump-cut to // the end of the enter animation and reschedule exitPip to run after enter-PiP // has finished its transition and allowed the client to draw in PiP mode. mPipTransitionController.end(() -> { exitPip(animationDurationMs, requestEnterSplit); }); return; } ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE, "exitPip: %s, state=%s", mTaskInfo.topActivity, mPipTransitionState); final WindowContainerTransaction wct = new WindowContainerTransaction(); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +10 −4 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import static com.android.wm.shell.transition.Transitions.TRANSIT_EXIT_PIP; import static com.android.wm.shell.transition.Transitions.TRANSIT_EXIT_PIP_TO_SPLIT; import static com.android.wm.shell.transition.Transitions.TRANSIT_REMOVE_PIP; import android.animation.Animator; import android.annotation.IntDef; import android.app.ActivityManager; import android.app.TaskInfo; Loading Loading @@ -348,9 +347,16 @@ public class PipTransition extends PipTransitionController { @Override public void end() { Animator animator = mPipAnimationController.getCurrentAnimator(); if (animator != null && animator.isRunning()) { animator.end(); end(null); } @Override public void end(@Nullable Runnable onTransitionEnd) { if (mPipAnimationController.isAnimating()) { mPipAnimationController.getCurrentAnimator().end(); } if (onTransitionEnd != null) { onTransitionEnd.run(); } } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java +8 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,14 @@ public abstract class PipTransitionController implements Transitions.TransitionH public void end() { } /** * End the currently-playing PiP animation. * * @param onTransitionEnd callback to run upon finishing the playing transition. */ public void end(@Nullable Runnable onTransitionEnd) { } /** Starts the {@link android.window.SystemPerformanceHinter.HighPerfSession}. */ public void startHighPerfSession() {} Loading