Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +1 −0 Original line number Diff line number Diff line Loading @@ -1007,6 +1007,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener, return; } if (Transitions.ENABLE_SHELL_TRANSITIONS) { mPipTransitionController.onFixedRotationFinished(); clearWaitForFixedRotation(); return; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +23 −1 Original line number Diff line number Diff line Loading @@ -409,9 +409,31 @@ public class PipTransition extends PipTransitionController { @Override public void onFixedRotationStarted() { fadeEnteredPipIfNeed(false /* show */); } @Override public void onFixedRotationFinished() { fadeEnteredPipIfNeed(true /* show */); } private void fadeEnteredPipIfNeed(boolean show) { // The transition with this fixed rotation may be handled by other handler before reaching // PipTransition, so we cannot do this in #startAnimation. if (mPipTransitionState.getTransitionState() == ENTERED_PIP && !mHasFadeOut) { if (!mPipTransitionState.hasEnteredPip()) { return; } if (show && mHasFadeOut) { // If there is a pending transition, then let startAnimation handle it. And if it is // handled, mHasFadeOut will be set to false and this runnable will be no-op. Otherwise // make sure the PiP will reshow, e.g. swipe-up with fixed rotation (fade-out) but // return to the current app (only finish the recent transition). mTransitions.runOnIdle(() -> { if (mHasFadeOut && mPipTransitionState.hasEnteredPip()) { fadeExistingPip(true /* show */); } }); } else if (!show && !mHasFadeOut) { // Fade out the existing PiP to avoid jump cut during seamless rotation. fadeExistingPip(false /* show */); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java +4 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,10 @@ public abstract class PipTransitionController implements Transitions.TransitionH public void onFixedRotationStarted() { } /** Called when the fixed rotation finished. */ public void onFixedRotationFinished() { } public PipTransitionController( @NonNull ShellInit shellInit, @NonNull ShellTaskOrganizer shellTaskOrganizer, Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java +1 −0 Original line number Diff line number Diff line Loading @@ -1007,6 +1007,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener, return; } if (Transitions.ENABLE_SHELL_TRANSITIONS) { mPipTransitionController.onFixedRotationFinished(); clearWaitForFixedRotation(); return; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java +23 −1 Original line number Diff line number Diff line Loading @@ -409,9 +409,31 @@ public class PipTransition extends PipTransitionController { @Override public void onFixedRotationStarted() { fadeEnteredPipIfNeed(false /* show */); } @Override public void onFixedRotationFinished() { fadeEnteredPipIfNeed(true /* show */); } private void fadeEnteredPipIfNeed(boolean show) { // The transition with this fixed rotation may be handled by other handler before reaching // PipTransition, so we cannot do this in #startAnimation. if (mPipTransitionState.getTransitionState() == ENTERED_PIP && !mHasFadeOut) { if (!mPipTransitionState.hasEnteredPip()) { return; } if (show && mHasFadeOut) { // If there is a pending transition, then let startAnimation handle it. And if it is // handled, mHasFadeOut will be set to false and this runnable will be no-op. Otherwise // make sure the PiP will reshow, e.g. swipe-up with fixed rotation (fade-out) but // return to the current app (only finish the recent transition). mTransitions.runOnIdle(() -> { if (mHasFadeOut && mPipTransitionState.hasEnteredPip()) { fadeExistingPip(true /* show */); } }); } else if (!show && !mHasFadeOut) { // Fade out the existing PiP to avoid jump cut during seamless rotation. fadeExistingPip(false /* show */); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java +4 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,10 @@ public abstract class PipTransitionController implements Transitions.TransitionH public void onFixedRotationStarted() { } /** Called when the fixed rotation finished. */ public void onFixedRotationFinished() { } public PipTransitionController( @NonNull ShellInit shellInit, @NonNull ShellTaskOrganizer shellTaskOrganizer, Loading