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

Commit de8c4a96 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Enable fixed rotation transform by default

Bug: 155722721
Test: 1. adb shell settings delete global fixed_rotation_transform
      2. Reboot
      3. adb shell settings get global fixed_rotation_transform
      4. The output should be 1
Change-Id: I6d23dda77dbfc5622460544352113b2d93cbb053
parent cb7f8e72
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -926,8 +926,14 @@ public class WindowManagerService extends IWindowManager.Stub
        }

        void updateFixedRotationTransform() {
            mIsFixedRotationTransformEnabled = Settings.Global.getInt(mContext.getContentResolver(),
                    FIXED_ROTATION_TRANSFORM_SETTING_NAME, 0) != 0;
            final int enabled = Settings.Global.getInt(mContext.getContentResolver(),
                    FIXED_ROTATION_TRANSFORM_SETTING_NAME, 2);
            if (enabled == 2) {
                // Make sure who read the settings won't use inconsistent default value.
                Settings.Global.putInt(mContext.getContentResolver(),
                        FIXED_ROTATION_TRANSFORM_SETTING_NAME, 1);
            }
            mIsFixedRotationTransformEnabled = enabled != 0;
        }
    }