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

Commit 51bdbe79 authored by Roman Birg's avatar Roman Birg Committed by Gerrit Code Review
Browse files

Only accept user rotations when in USER_ROTATION_FREE mode



Change-Id: I66fe4c755c744f9eab8a1a56c69ddb8748c03f7b
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 3f095e6f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -6430,8 +6430,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                boolean useSensorRotation =
                        orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR
                        || orientation == ActivityInfo.SCREEN_ORIENTATION_FULL_USER
                        || RotationPolicy.isRotationAllowed(sensorRotation, mUserRotationAngles,
                                mAllowAllRotations != 0);
                        || (mUserRotationMode == WindowManagerPolicy.USER_ROTATION_FREE
                            && RotationPolicy.isRotationAllowed(sensorRotation, mUserRotationAngles,
                            mAllowAllRotations != 0));
                if (useSensorRotation) {
                    preferredRotation = sensorRotation;
                } else {