Loading core/java/android/bluetooth/BluetoothProfile.java +12 −0 Original line number Diff line number Diff line Loading @@ -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 Loading core/java/android/provider/Settings.java +7 −0 Original line number Diff line number Diff line Loading @@ -6029,6 +6029,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). Loading packages/SettingsProvider/res/values/defaults.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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> Loading packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +11 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading Loading
core/java/android/bluetooth/BluetoothProfile.java +12 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
core/java/android/provider/Settings.java +7 −0 Original line number Diff line number Diff line Loading @@ -6029,6 +6029,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). Loading
packages/SettingsProvider/res/values/defaults.xml +1 −0 Original line number Diff line number Diff line Loading @@ -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> Loading
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +11 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading