Merge "Use current rotation for snapshot of canceling fixed rotation" into sc-dev am: c63b6d1b2a

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

Change-Id: I0ea7f7177fbbf231b65d8bff0bcb3e64467f193d
This commit is contained in:
Riddle Hsu
2021-05-20 06:03:59 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 1 deletions

View File

@@ -4213,6 +4213,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
void clearAllDrawn() {
allDrawn = false;
mLastAllDrawn = false;
}
/**

View File

@@ -253,7 +253,16 @@ class ScreenRotationAnimation {
ProtoLog.i(WM_SHOW_SURFACE_ALLOC,
" FREEZE %s: CREATE", mScreenshotLayer);
setRotation(t, realOriginalRotation);
if (originalRotation == realOriginalRotation) {
setRotation(t, realOriginalRotation);
} else {
// If the given original rotation is different from real original display rotation,
// this is playing non-zero degree rotation animation without display rotation change,
// so the snapshot doesn't need to be transformed.
mCurRotation = realOriginalRotation;
mSnapshotInitialMatrix.reset();
setRotationTransform(t, mSnapshotInitialMatrix);
}
t.apply();
}