Merge "Use seamless for collecting transition with fixed rotation" into tm-qpr-dev
This commit is contained in:
@@ -7710,6 +7710,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
// This activity may relaunch or perform configuration change so once it has reported drawn,
|
// This activity may relaunch or perform configuration change so once it has reported drawn,
|
||||||
// the screen can be unfrozen.
|
// the screen can be unfrozen.
|
||||||
ensureActivityConfiguration(0 /* globalChanges */, !PRESERVE_WINDOWS);
|
ensureActivityConfiguration(0 /* globalChanges */, !PRESERVE_WINDOWS);
|
||||||
|
if (mTransitionController.isCollecting(this)) {
|
||||||
|
// In case the task was changed from PiP but still keeps old transform.
|
||||||
|
task.resetSurfaceControlTransforms();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setRequestedOrientation(int requestedOrientation) {
|
void setRequestedOrientation(int requestedOrientation) {
|
||||||
|
|||||||
@@ -3334,6 +3334,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
if (!controller.isCollecting(this)) {
|
if (!controller.isCollecting(this)) {
|
||||||
controller.collect(this);
|
controller.collect(this);
|
||||||
startAsyncRotationIfNeeded();
|
startAsyncRotationIfNeeded();
|
||||||
|
if (mFixedRotationLaunchingApp != null) {
|
||||||
|
setSeamlessTransitionForFixedRotation(controller.getCollectingTransition());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3343,12 +3346,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
mAtmService.startLaunchPowerMode(POWER_MODE_REASON_CHANGE_DISPLAY);
|
mAtmService.startLaunchPowerMode(POWER_MODE_REASON_CHANGE_DISPLAY);
|
||||||
if (mFixedRotationLaunchingApp != null) {
|
if (mFixedRotationLaunchingApp != null) {
|
||||||
// A fixed-rotation transition is done, then continue to start a seamless display
|
// A fixed-rotation transition is done, then continue to start a seamless display
|
||||||
// transition. And be fore the start transaction is applied, the non-app windows
|
// transition.
|
||||||
// need to keep in previous rotation to avoid showing inconsistent content.
|
setSeamlessTransitionForFixedRotation(t);
|
||||||
t.setSeamlessRotation(this);
|
|
||||||
if (mAsyncRotationController != null) {
|
|
||||||
mAsyncRotationController.keepAppearanceInPreviousRotation();
|
|
||||||
}
|
|
||||||
} else if (isRotationChanging()) {
|
} else if (isRotationChanging()) {
|
||||||
if (displayChange != null) {
|
if (displayChange != null) {
|
||||||
final boolean seamless = mDisplayRotation.shouldRotateSeamlessly(
|
final boolean seamless = mDisplayRotation.shouldRotateSeamlessly(
|
||||||
@@ -3367,6 +3366,15 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setSeamlessTransitionForFixedRotation(Transition t) {
|
||||||
|
t.setSeamlessRotation(this);
|
||||||
|
// Before the start transaction is applied, the non-app windows need to keep in previous
|
||||||
|
// rotation to avoid showing inconsistent content.
|
||||||
|
if (mAsyncRotationController != null) {
|
||||||
|
mAsyncRotationController.keepAppearanceInPreviousRotation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** If the display is in transition, there should be a screenshot covering it. */
|
/** If the display is in transition, there should be a screenshot covering it. */
|
||||||
@Override
|
@Override
|
||||||
boolean inTransition() {
|
boolean inTransition() {
|
||||||
|
|||||||
Reference in New Issue
Block a user