Merge "Make autorotate off by default for new installs and upgrades"
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<string name="def_bluetooth_disabled_profiles" translatable="false">0</string>
|
||||
<bool name="def_auto_time">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%. -->
|
||||
<integer name="def_screen_brightness">102</integer>
|
||||
<bool name="def_screen_brightness_automatic_mode">false</bool>
|
||||
|
||||
@@ -2945,7 +2945,7 @@ public class SettingsProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
private final class UpgradeController {
|
||||
private static final int SETTINGS_VERSION = 150;
|
||||
private static final int SETTINGS_VERSION = 151;
|
||||
|
||||
private final int mUserId;
|
||||
|
||||
@@ -3538,6 +3538,18 @@ public class SettingsProvider extends ContentProvider {
|
||||
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.
|
||||
|
||||
if (currentVersion != newVersion) {
|
||||
|
||||
Reference in New Issue
Block a user