summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jakub Pawlowski <jpawlowski@google.com> 2017-11-22 10:57:42 -0800
committer Jakub Pawlowski <jpawlowski@google.com> 2017-11-28 07:27:29 +0000
commitcb6ce25529d03db3567156661f7abacc314fbb26 (patch)
tree100a20bc9da73a4af026bc38d7785e88c4f5e48c
parent419ec0528444ba4755199ed6cf6ffa6d1b201d95 (diff)
Add persistent state for Hearing Aid Profile
Defines the flag used in code and the Settings.Global key names for persisting state of the Bluetooth Hearing Aid Profile. Test: manual Bug: 69623109 Change-Id: I19e68be55a80f338bdc5d39d6c3c6d251f1cb514 Merged-In: I19e68be55a80f338bdc5d39d6c3c6d251f1cb514
-rw-r--r--core/java/android/provider/Settings.java11
-rw-r--r--core/proto/android/providers/settings.proto1
-rw-r--r--core/tests/coretests/src/android/provider/SettingsBackupTest.java1
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java3
4 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index df944fd92b65..6560a8f9a21f 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -9224,6 +9224,9 @@ public final class Settings {
/** {@hide} */
public static final String
BLUETOOTH_PAN_PRIORITY_PREFIX = "bluetooth_pan_priority_";
+ /** {@hide} */
+ public static final String
+ BLUETOOTH_HEARING_AID_PRIORITY_PREFIX = "bluetooth_hearing_aid_priority_";
/**
* Activity manager specific settings.
@@ -9545,6 +9548,14 @@ public final class Settings {
}
/**
+ * Get the key that retrieves a bluetooth hearing aid priority.
+ * @hide
+ */
+ public static final String getBluetoothHearingAidPriorityKey(String address) {
+ return BLUETOOTH_HEARING_AID_PRIORITY_PREFIX + address.toUpperCase(Locale.ROOT);
+ }
+
+ /**
* Get the key that retrieves a bluetooth map priority.
* @hide
*/
diff --git a/core/proto/android/providers/settings.proto b/core/proto/android/providers/settings.proto
index fa645f4d4c6a..ef6eb0913da4 100644
--- a/core/proto/android/providers/settings.proto
+++ b/core/proto/android/providers/settings.proto
@@ -254,6 +254,7 @@ message GlobalSettingsProto {
SettingProto bluetooth_pbap_client_priority_prefix = 209;
SettingProto bluetooth_sap_priority_prefix = 210;
SettingProto bluetooth_pan_priority_prefix = 211;
+ SettingProto bluetooth_hearing_aid_priority_prefix = 345;
SettingProto device_idle_constants = 212;
SettingProto device_idle_constants_watch = 213;
SettingProto app_idle_constants = 214;
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index a979ac82dafa..9edaffe2bde1 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -121,6 +121,7 @@ public class SettingsBackupTest {
Settings.Global.BLUETOOTH_PAN_PRIORITY_PREFIX,
Settings.Global.BLUETOOTH_PBAP_CLIENT_PRIORITY_PREFIX,
Settings.Global.BLUETOOTH_SAP_PRIORITY_PREFIX,
+ Settings.Global.BLUETOOTH_HEARING_AID_PRIORITY_PREFIX,
Settings.Global.BOOT_COUNT,
Settings.Global.CAPTIVE_PORTAL_FALLBACK_URL,
Settings.Global.CAPTIVE_PORTAL_HTTPS_URL,
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 819ee3ee57ff..d256b12fe285 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -720,6 +720,9 @@ class SettingsProtoDumpUtil {
Settings.Global.BLUETOOTH_PAN_PRIORITY_PREFIX,
GlobalSettingsProto.BLUETOOTH_PAN_PRIORITY_PREFIX);
dumpSetting(s, p,
+ Settings.Global.BLUETOOTH_HEARING_AID_PRIORITY_PREFIX,
+ GlobalSettingsProto.BLUETOOTH_HEARING_AID_PRIORITY_PREFIX);
+ dumpSetting(s, p,
Settings.Global.DEVICE_IDLE_CONSTANTS,
GlobalSettingsProto.DEVICE_IDLE_CONSTANTS);
dumpSetting(s, p,