summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Bryce Lee <brycelee@google.com> 2015-12-17 19:01:37 -0800
committer Bryce Lee <brycelee@google.com> 2015-12-18 03:05:20 +0000
commitbd17928afcbead00b498a75a92a0a32a6cca7fee (patch)
tree8b38274ba3434c3fc8fdc84c014db18777b93266
parentbe4904962eac3a2cd54c73629884c5892eb0379e (diff)
parent6b9e5bf0c29d5a56cc2a4f6586c426a9111b2c93 (diff)
resolve merge conflicts of 6b9e5bf0c2 to master.
Change-Id: Idada49313619533bfeb375ee232c942589457fa4
-rw-r--r--core/java/android/bluetooth/BluetoothProfile.java12
-rw-r--r--core/java/android/provider/Settings.java7
-rw-r--r--packages/SettingsProvider/res/values/defaults.xml1
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java12
4 files changed, 31 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index cbce22cdea60..6bf3fab71ec7 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -131,6 +131,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
* @hide
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 950807781f8b..b883f9c736d0 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6133,6 +6133,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).
* <p>
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 6680d8857ccb..51d8ca03d4af 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 7365e666ae3c..bcb459a174a0 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.