diff options
author | Bryce Lee <brycelee@google.com> | 2015-12-17 11:45:17 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-12-17 11:45:17 -0800 |
commit | 9eaa59a1ff315bbf4d9809b30bf7777aa88e6bee (patch) | |
tree | 5816868ace6bea4d7cbbdcde7863b122619fbe04 /packages/SettingsProvider | |
parent | fc3762aafd58ff9eada0b5ed261de20a40d7b07a (diff) | |
parent | cf91b45c05358c81ddaccf3ddd4b1ea6d5295faa (diff) | |
download | frameworks_base-9eaa59a1ff315bbf4d9809b30bf7777aa88e6bee.zip frameworks_base-9eaa59a1ff315bbf4d9809b30bf7777aa88e6bee.tar.gz frameworks_base-9eaa59a1ff315bbf4d9809b30bf7777aa88e6bee.tar.bz2 |
Merge "Add setting for declaring disabled bluetooth profiles." into cw-e-dev
am: cf91b45c05
* commit 'cf91b45c05358c81ddaccf3ddd4b1ea6d5295faa':
Add setting for declaring disabled bluetooth profiles.
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/res/values/defaults.xml | 1 | ||||
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index 1cd2908..ef32c19 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -25,6 +25,7 @@ <!-- 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_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> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 73971ad..aa00f7d 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -1855,7 +1855,7 @@ public class SettingsProvider extends ContentProvider { } private final class UpgradeController { - private static final int SETTINGS_VERSION = 122; + private static final int SETTINGS_VERSION = 123; private final int mUserId; @@ -2007,6 +2007,16 @@ public class SettingsProvider extends ContentProvider { } currentVersion = 122; } + + if (currentVersion == 122) { + final SettingsState globalSettings = getGlobalSettingsLocked(); + String defaultDisabledProfiles = (getContext().getResources().getString( + R.string.def_bluetooth_disabled_profiles)); + globalSettings.insertSettingLocked(Settings.Global.BLUETOOTH_DISABLED_PROFILES, + defaultDisabledProfiles, SettingsState.SYSTEM_PACKAGE_NAME); + currentVersion = 123; + } + // vXXX: Add new settings above this point. // Return the current version. |