Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 317990f4 authored by Roman Birg's avatar Roman Birg Committed by Gerrit Code Review
Browse files

Revert "Only accept user rotations when in USER_ROTATION_FREE mode"

Seems to break the scenario when the app is requesting sensorLandscape, and the user has 90/270 enabled, the system won't rotate to that rotation.

Ref: OSS NIGHTLIES-1976

This reverts commit 51bdbe79.

Change-Id: I227bc5662909efa3ef7ed806496e51ef0e23cacd
parent d19d27b9
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -6430,9 +6430,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                boolean useSensorRotation =
                        orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR
                        || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_USER
                        || (mUserRotationMode == WindowManagerPolicy.USER_ROTATION_FREE
                            && RotationPolicy.isRotationAllowed(sensorRotation, mUserRotationAngles,
                            mAllowAllRotations != 0));
                        || RotationPolicy.isRotationAllowed(sensorRotation, mUserRotationAngles,
                                mAllowAllRotations != 0);
                if (useSensorRotation) {
                    preferredRotation = sensorRotation;
                } else {