diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java index cbce22cdea60a..6bf3fab71ec7f 100644 --- a/core/java/android/bluetooth/BluetoothProfile.java +++ b/core/java/android/bluetooth/BluetoothProfile.java @@ -130,6 +130,18 @@ public interface BluetoothProfile { */ public static final int HEADSET_CLIENT = 16; + /** + * HID Profile + * @hide + */ + public static final int HID = 17; + + /** + * HDP Profile + * @hide + */ + public static final int HDP = 18; + /** * Default priority for devices that we try to auto-connect to and * and allow incoming connections for the profile diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 950807781f8b4..b883f9c736d01 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -6132,6 +6132,13 @@ public final class Settings { */ public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; + /** + * A Long representing a bitmap of profiles that should be disabled when bluetooth starts. + * See {@link android.bluetooth.BluetoothProfile}. + * {@hide} + */ + public static final String BLUETOOTH_DISABLED_PROFILES = "bluetooth_disabled_profiles"; + /** * The policy for deciding when Wi-Fi should go to sleep (which will in * turn switch to using the mobile data as an Internet connection). diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index 6680d8857ccbc..51d8ca03d4af9 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -25,6 +25,7 @@ cell,bluetooth,wifi,nfc,wimax bluetooth,wifi,nfc + 0 true true true diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 7365e666ae3c3..bcb459a174a01 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -1890,7 +1890,7 @@ public class SettingsProvider extends ContentProvider { } private final class UpgradeController { - private static final int SETTINGS_VERSION = 123; + private static final int SETTINGS_VERSION = 124; private final int mUserId; @@ -2060,6 +2060,16 @@ public class SettingsProvider extends ContentProvider { } currentVersion = 123; } + + if (currentVersion == 123) { + 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 = 124; + } + // vXXX: Add new settings above this point. // Return the current version.