Correct recently introduced logic error in seamless rotation detection.
The code detecting whether we should rotate seamlessly (which for example we do not support for 180 degree rotations) was moved to before mRotation was updated, so it was always passing the same value for old and new rotation, and we were failing to perform the 180 degree rotation check. Correct this. Test: Rotate the device 180 degrees at once while in Camera. Things look ok. Bug: 32025371 Change-Id: I0ef08e8cc4e5d87fdff6d839381196c2b52e71d5
This commit is contained in:
@@ -6831,7 +6831,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
final WindowList windows = displayContent.getWindowList();
|
||||
|
||||
final int oldRotation = mRotation;
|
||||
boolean rotateSeamlessly = mPolicy.shouldRotateSeamlessly(oldRotation, mRotation);
|
||||
int rotation = mPolicy.rotationForOrientationLw(mLastOrientation, mRotation);
|
||||
boolean rotateSeamlessly = mPolicy.shouldRotateSeamlessly(oldRotation, rotation);
|
||||
|
||||
if (rotateSeamlessly) {
|
||||
for (int i = windows.size() - 1; i >= 0; i--) {
|
||||
@@ -6864,7 +6865,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
// an orientation that has different metrics than it expected.
|
||||
// eg. Portrait instead of Landscape.
|
||||
|
||||
int rotation = mPolicy.rotationForOrientationLw(mLastOrientation, mRotation);
|
||||
boolean altOrientation = !mPolicy.rotationHasCompatibleMetricsLw(
|
||||
mLastOrientation, rotation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user