Merge "Do not run rotation animation when folding/unfolding" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
56b9431082
@@ -5836,7 +5836,9 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!displayContent.isReady() || !mPolicy.isScreenOn() || !displayContent.okToAnimate()) {
|
if (!displayContent.isReady() || !displayContent.getDisplayPolicy().isScreenOnFully()
|
||||||
|
|| displayContent.getDisplayInfo().state == Display.STATE_OFF
|
||||||
|
|| !displayContent.okToAnimate()) {
|
||||||
// No need to freeze the screen before the display is ready, if the screen is off,
|
// No need to freeze the screen before the display is ready, if the screen is off,
|
||||||
// or we can't currently animate.
|
// or we can't currently animate.
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1752,6 +1752,11 @@ public class ActivityRecordTests extends WindowTestsBase {
|
|||||||
anyInt() /* orientation */, anyInt() /* lastRotation */);
|
anyInt() /* orientation */, anyInt() /* lastRotation */);
|
||||||
// Set to visible so the activity can freeze the screen.
|
// Set to visible so the activity can freeze the screen.
|
||||||
activity.setVisibility(true);
|
activity.setVisibility(true);
|
||||||
|
// Update the display policy to make the screen fully turned on so the freeze is allowed
|
||||||
|
display.getDisplayPolicy().screenTurnedOn(null);
|
||||||
|
display.getDisplayPolicy().finishKeyguardDrawn();
|
||||||
|
display.getDisplayPolicy().finishWindowsDrawn();
|
||||||
|
display.getDisplayPolicy().finishScreenTurningOn();
|
||||||
|
|
||||||
display.rotateInDifferentOrientationIfNeeded(activity);
|
display.rotateInDifferentOrientationIfNeeded(activity);
|
||||||
display.setFixedRotationLaunchingAppUnchecked(activity);
|
display.setFixedRotationLaunchingAppUnchecked(activity);
|
||||||
|
|||||||
Reference in New Issue
Block a user