Merge "Fix invalidate rotation value which causes CTS failures" into tm-qpr-dev am: 72b75946f2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20316303

Change-Id: Idae47c78557da211ae6361bb5459ac97c7858fc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jiaming Liu
2022-11-02 03:53:50 +00:00
committed by Automerger Merge Worker

View File

@@ -1578,7 +1578,9 @@ public class DisplayRotation {
false /* forceRelayout */);
} else {
// Revert the rotation to our saved value if we transition from HALF_FOLDED.
mRotation = mHalfFoldSavedRotation;
if (mHalfFoldSavedRotation != -1) {
mRotation = mHalfFoldSavedRotation;
}
// Tell the device to update its orientation (mFoldState is still HALF_FOLDED here
// so we will override USER_ROTATION_LOCKED and allow a rotation).
mService.updateRotation(false /* alwaysSendConfiguration */,