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

Commit 4af4a6f0 authored by Mike Digman's avatar Mike Digman
Browse files

Make autorotate off by default for new installs and upgrades

For dogfood testing to monitor usage of new rotate locked mode

Test: manual

Change-Id: I4678a31b4ee8b8ff7f282b453843cae8fb2df7dc
parent e1daf52b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -28,7 +28,7 @@
    <string name="def_bluetooth_disabled_profiles" translatable="false">0</string>
    <string name="def_bluetooth_disabled_profiles" translatable="false">0</string>
    <bool name="def_auto_time">true</bool>
    <bool name="def_auto_time">true</bool>
    <bool name="def_auto_time_zone">true</bool>
    <bool name="def_auto_time_zone">true</bool>
    <bool name="def_accelerometer_rotation">true</bool>
    <bool name="def_accelerometer_rotation">false</bool>
    <!-- Default screen brightness, from 0 to 255.  102 is 40%. -->
    <!-- Default screen brightness, from 0 to 255.  102 is 40%. -->
    <integer name="def_screen_brightness">102</integer>
    <integer name="def_screen_brightness">102</integer>
    <bool name="def_screen_brightness_automatic_mode">false</bool>
    <bool name="def_screen_brightness_automatic_mode">false</bool>
+13 −1
Original line number Original line Diff line number Diff line
@@ -2940,7 +2940,7 @@ public class SettingsProvider extends ContentProvider {
        }
        }


        private final class UpgradeController {
        private final class UpgradeController {
            private static final int SETTINGS_VERSION = 150;
            private static final int SETTINGS_VERSION = 151;


            private final int mUserId;
            private final int mUserId;


@@ -3533,6 +3533,18 @@ public class SettingsProvider extends ContentProvider {
                    currentVersion = 150;
                    currentVersion = 150;
                }
                }


                if (currentVersion == 150) {
                    // Version 151: Reset rotate locked setting for upgrading users
                    final SettingsState systemSettings = getSystemSettingsLocked(userId);
                    systemSettings.insertSettingLocked(
                            Settings.System.ACCELEROMETER_ROTATION,
                            getContext().getResources().getBoolean(
                                    R.bool.def_accelerometer_rotation) ? "1" : "0",
                            null, true, SettingsState.SYSTEM_PACKAGE_NAME);

                    currentVersion = 151;
                }

                // vXXX: Add new settings above this point.
                // vXXX: Add new settings above this point.


                if (currentVersion != newVersion) {
                if (currentVersion != newVersion) {