Loading packages/SettingsProvider/res/values/defaults.xml +2 −2 Original line number Diff line number Diff line Loading @@ -23,8 +23,8 @@ <bool name="def_airplane_mode_on">false</bool> <bool name="def_theater_mode_on">false</bool> <!-- Comma-separated list of bluetooth, wifi, and cell. --> <string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,wifi,nfc,wimax</string> <string name="airplane_mode_toggleable_radios" translatable="false">bluetooth,wifi,nfc</string> <string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,uwb,wifi,wimax</string> <string name="airplane_mode_toggleable_radios" translatable="false">bluetooth,wifi</string> <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> Loading packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +26 −1 Original line number Diff line number Diff line Loading @@ -3739,7 +3739,7 @@ public class SettingsProvider extends ContentProvider { } private final class UpgradeController { private static final int SETTINGS_VERSION = 215; private static final int SETTINGS_VERSION = 216; private final int mUserId; Loading Loading @@ -5737,6 +5737,31 @@ public class SettingsProvider extends ContentProvider { currentVersion = 215; } if (currentVersion == 215) { // Version 215: default |def_airplane_mode_radios| and // |airplane_mode_toggleable_radios| changed to remove NFC & add UWB. final SettingsState globalSettings = getGlobalSettingsLocked(); final String oldApmRadiosValue = globalSettings.getSettingLocked( Settings.Global.AIRPLANE_MODE_RADIOS).getValue(); if (TextUtils.equals("cell,bluetooth,wifi,nfc,wimax", oldApmRadiosValue)) { globalSettings.insertSettingOverrideableByRestoreLocked( Settings.Global.AIRPLANE_MODE_RADIOS, getContext().getResources().getString( R.string.def_airplane_mode_radios), null, true, SettingsState.SYSTEM_PACKAGE_NAME); } final String oldApmToggleableRadiosValue = globalSettings.getSettingLocked( Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS).getValue(); if (TextUtils.equals("bluetooth,wifi,nfc", oldApmToggleableRadiosValue)) { globalSettings.insertSettingOverrideableByRestoreLocked( Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS, getContext().getResources().getString( R.string.airplane_mode_toggleable_radios), null, true, SettingsState.SYSTEM_PACKAGE_NAME); } currentVersion = 216; } // vXXX: Add new settings above this point. if (currentVersion != newVersion) { Loading Loading
packages/SettingsProvider/res/values/defaults.xml +2 −2 Original line number Diff line number Diff line Loading @@ -23,8 +23,8 @@ <bool name="def_airplane_mode_on">false</bool> <bool name="def_theater_mode_on">false</bool> <!-- Comma-separated list of bluetooth, wifi, and cell. --> <string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,wifi,nfc,wimax</string> <string name="airplane_mode_toggleable_radios" translatable="false">bluetooth,wifi,nfc</string> <string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,uwb,wifi,wimax</string> <string name="airplane_mode_toggleable_radios" translatable="false">bluetooth,wifi</string> <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> Loading
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +26 −1 Original line number Diff line number Diff line Loading @@ -3739,7 +3739,7 @@ public class SettingsProvider extends ContentProvider { } private final class UpgradeController { private static final int SETTINGS_VERSION = 215; private static final int SETTINGS_VERSION = 216; private final int mUserId; Loading Loading @@ -5737,6 +5737,31 @@ public class SettingsProvider extends ContentProvider { currentVersion = 215; } if (currentVersion == 215) { // Version 215: default |def_airplane_mode_radios| and // |airplane_mode_toggleable_radios| changed to remove NFC & add UWB. final SettingsState globalSettings = getGlobalSettingsLocked(); final String oldApmRadiosValue = globalSettings.getSettingLocked( Settings.Global.AIRPLANE_MODE_RADIOS).getValue(); if (TextUtils.equals("cell,bluetooth,wifi,nfc,wimax", oldApmRadiosValue)) { globalSettings.insertSettingOverrideableByRestoreLocked( Settings.Global.AIRPLANE_MODE_RADIOS, getContext().getResources().getString( R.string.def_airplane_mode_radios), null, true, SettingsState.SYSTEM_PACKAGE_NAME); } final String oldApmToggleableRadiosValue = globalSettings.getSettingLocked( Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS).getValue(); if (TextUtils.equals("bluetooth,wifi,nfc", oldApmToggleableRadiosValue)) { globalSettings.insertSettingOverrideableByRestoreLocked( Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS, getContext().getResources().getString( R.string.airplane_mode_toggleable_radios), null, true, SettingsState.SYSTEM_PACKAGE_NAME); } currentVersion = 216; } // vXXX: Add new settings above this point. if (currentVersion != newVersion) { Loading