Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.pip2.phone; import static android.app.WindowConfiguration.ROTATION_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE; Loading Loading @@ -293,6 +294,11 @@ public class PipController implements ConfigurationChangeListener, // Update the display layout caches even if we are not in PiP. setDisplayLayout(mDisplayController.getDisplayLayout(displayId)); if (toRotation != ROTATION_UNDEFINED) { // Make sure we rotate to final rotation ourselves in case display change is coming // from the remote rotation as a part of an already collecting transition. mPipDisplayLayoutState.rotateTo(toRotation); } if (!mPipTransitionState.isInPip()) { // Skip the PiP-relevant updates if we aren't in a valid PiP state. Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java +8 −1 Original line number Diff line number Diff line Loading @@ -241,7 +241,7 @@ public class PipTransition extends PipTransitionController implements extra.putParcelable(PIP_TASK_LEASH, pipChange.getLeash()); mPipTransitionState.setState(PipTransitionState.ENTERING_PIP, extra); if (mPipTransitionState.isInSwipePipToHomeTransition()) { if (isInSwipePipToHomeTransition()) { // If this is the second transition as a part of swipe PiP to home cuj, // handle this transition as a special case with no-op animation. return handleSwipePipToHomeTransition(info, startTransaction, finishTransaction, Loading Loading @@ -702,6 +702,13 @@ public class PipTransition extends PipTransitionController implements @NonNull TransitionInfo.Change pipChange) { TransitionInfo.Change fixedRotationChange = findFixedRotationChange(info); int startRotation = pipChange.getStartRotation(); if (pipChange.getEndRotation() != ROTATION_UNDEFINED && startRotation != pipChange.getEndRotation()) { // If PiP change was collected along with the display change and the orientation change // happened in sync with the PiP change, then do not treat this as fixed-rotation case. return ROTATION_0; } int endRotation = fixedRotationChange != null ? fixedRotationChange.getEndFixedRotation() : mPipDisplayLayoutState.getRotation(); int delta = endRotation == ROTATION_UNDEFINED ? ROTATION_0 Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.pip2.phone; import static android.app.WindowConfiguration.ROTATION_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE; Loading Loading @@ -293,6 +294,11 @@ public class PipController implements ConfigurationChangeListener, // Update the display layout caches even if we are not in PiP. setDisplayLayout(mDisplayController.getDisplayLayout(displayId)); if (toRotation != ROTATION_UNDEFINED) { // Make sure we rotate to final rotation ourselves in case display change is coming // from the remote rotation as a part of an already collecting transition. mPipDisplayLayoutState.rotateTo(toRotation); } if (!mPipTransitionState.isInPip()) { // Skip the PiP-relevant updates if we aren't in a valid PiP state. Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java +8 −1 Original line number Diff line number Diff line Loading @@ -241,7 +241,7 @@ public class PipTransition extends PipTransitionController implements extra.putParcelable(PIP_TASK_LEASH, pipChange.getLeash()); mPipTransitionState.setState(PipTransitionState.ENTERING_PIP, extra); if (mPipTransitionState.isInSwipePipToHomeTransition()) { if (isInSwipePipToHomeTransition()) { // If this is the second transition as a part of swipe PiP to home cuj, // handle this transition as a special case with no-op animation. return handleSwipePipToHomeTransition(info, startTransaction, finishTransaction, Loading Loading @@ -702,6 +702,13 @@ public class PipTransition extends PipTransitionController implements @NonNull TransitionInfo.Change pipChange) { TransitionInfo.Change fixedRotationChange = findFixedRotationChange(info); int startRotation = pipChange.getStartRotation(); if (pipChange.getEndRotation() != ROTATION_UNDEFINED && startRotation != pipChange.getEndRotation()) { // If PiP change was collected along with the display change and the orientation change // happened in sync with the PiP change, then do not treat this as fixed-rotation case. return ROTATION_0; } int endRotation = fixedRotationChange != null ? fixedRotationChange.getEndFixedRotation() : mPipDisplayLayoutState.getRotation(); int delta = endRotation == ROTATION_UNDEFINED ? ROTATION_0 Loading