Merge "Keep rotation transform for exiting PiP with fixed rotation" into tm-qpr-dev
This commit is contained in:
@@ -358,8 +358,10 @@ public class PipTransition extends PipTransitionController {
|
|||||||
WindowContainerTransaction wct = null;
|
WindowContainerTransaction wct = null;
|
||||||
if (isOutPipDirection(direction)) {
|
if (isOutPipDirection(direction)) {
|
||||||
// Only need to reset surface properties. The server-side operations were already
|
// Only need to reset surface properties. The server-side operations were already
|
||||||
// done at the start.
|
// done at the start. But if it is running fixed rotation, there will be a seamless
|
||||||
if (tx != null) {
|
// display transition later. So the last rotation transform needs to be kept to
|
||||||
|
// avoid flickering, and then the display transition will reset the transform.
|
||||||
|
if (tx != null && !mInFixedRotation) {
|
||||||
mFinishTransaction.merge(tx);
|
mFinishTransaction.merge(tx);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1930,7 +1930,6 @@ class Task extends TaskFragment {
|
|||||||
mTaskSupervisor.scheduleUpdateMultiWindowMode(this);
|
mTaskSupervisor.scheduleUpdateMultiWindowMode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
final int newWinMode = getWindowingMode();
|
|
||||||
if (shouldStartChangeTransition(prevWinMode, mTmpPrevBounds)) {
|
if (shouldStartChangeTransition(prevWinMode, mTmpPrevBounds)) {
|
||||||
initializeChangeTransition(mTmpPrevBounds);
|
initializeChangeTransition(mTmpPrevBounds);
|
||||||
}
|
}
|
||||||
@@ -1944,16 +1943,15 @@ class Task extends TaskFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pipChanging && wasInPictureInPicture) {
|
if (pipChanging && wasInPictureInPicture
|
||||||
|
&& !mTransitionController.isShellTransitionsEnabled()) {
|
||||||
// If the top activity is changing from PiP to fullscreen with fixed rotation,
|
// If the top activity is changing from PiP to fullscreen with fixed rotation,
|
||||||
// clear the crop and rotation matrix of task because fixed rotation will handle
|
// clear the crop and rotation matrix of task because fixed rotation will handle
|
||||||
// the transformation on activity level. This also avoids flickering caused by the
|
// the transformation on activity level. This also avoids flickering caused by the
|
||||||
// latency of fullscreen task organizer configuring the surface.
|
// latency of fullscreen task organizer configuring the surface.
|
||||||
final ActivityRecord r = topRunningActivity();
|
final ActivityRecord r = topRunningActivity();
|
||||||
if (r != null && mDisplayContent.isFixedRotationLaunchingApp(r)) {
|
if (r != null && mDisplayContent.isFixedRotationLaunchingApp(r)) {
|
||||||
getSyncTransaction().setWindowCrop(mSurfaceControl, null)
|
resetSurfaceControlTransforms();
|
||||||
.setCornerRadius(mSurfaceControl, 0f)
|
|
||||||
.setMatrix(mSurfaceControl, Matrix.IDENTITY_MATRIX, new float[9]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -588,9 +588,7 @@ class WindowToken extends WindowContainer<WindowState> {
|
|||||||
.setCallsite("WindowToken.getOrCreateFixedRotationLeash")
|
.setCallsite("WindowToken.getOrCreateFixedRotationLeash")
|
||||||
.build();
|
.build();
|
||||||
t.setPosition(leash, mLastSurfacePosition.x, mLastSurfacePosition.y);
|
t.setPosition(leash, mLastSurfacePosition.x, mLastSurfacePosition.y);
|
||||||
t.show(leash);
|
|
||||||
t.reparent(getSurfaceControl(), leash);
|
t.reparent(getSurfaceControl(), leash);
|
||||||
t.setAlpha(getSurfaceControl(), 1.f);
|
|
||||||
mFixedRotationTransformLeash = leash;
|
mFixedRotationTransformLeash = leash;
|
||||||
updateSurfaceRotation(t, rotation, mFixedRotationTransformLeash);
|
updateSurfaceRotation(t, rotation, mFixedRotationTransformLeash);
|
||||||
return mFixedRotationTransformLeash;
|
return mFixedRotationTransformLeash;
|
||||||
|
|||||||
Reference in New Issue
Block a user