summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHeadset.java
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2022-03-11 19:27:17 +0000
committerScott Lobdell <slobdell@google.com>2022-03-11 19:57:09 +0000
commitc9218ef1b82430a07d94f74c212a30e7ccc52975 (patch)
tree241b7fdeb6bdf1cf3af925ba8996f18faa8973d9 /framework/java/android/bluetooth/BluetoothHeadset.java
parenta26bda4d37221f2f7ef750b413502091e3bcddd4 (diff)
parent480d2270b269a0e47bf475eb439111f3f966e2a9 (diff)
Merge TP1A.220225.003
Change-Id: Id71ac466dbfe3707fe2e544ce22b1da8f474ec2b
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHeadset.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothHeadset.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHeadset.java b/framework/java/android/bluetooth/BluetoothHeadset.java
index 8a037a97c0..4ff224d21a 100644
--- a/framework/java/android/bluetooth/BluetoothHeadset.java
+++ b/framework/java/android/bluetooth/BluetoothHeadset.java
@@ -1005,10 +1005,21 @@ public final class BluetoothHeadset implements BluetoothProfile {
BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED,
BluetoothStatusCodes.ERROR_PROFILE_SERVICE_NOT_BOUND,
BluetoothStatusCodes.ERROR_TIMEOUT,
+ BluetoothStatusCodes.ERROR_UNKNOWN,
+ })
+ public @interface SetAudioRouteAllowedReturnValues {}
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(value = {
BluetoothStatusCodes.ALLOWED,
BluetoothStatusCodes.NOT_ALLOWED,
+ BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED,
+ BluetoothStatusCodes.ERROR_PROFILE_SERVICE_NOT_BOUND,
+ BluetoothStatusCodes.ERROR_TIMEOUT,
+ BluetoothStatusCodes.ERROR_UNKNOWN,
})
- public @interface AudioRouteAllowedReturnValues {}
+ public @interface GetAudioRouteAllowedReturnValues {}
/**
* Sets whether audio routing is allowed. When set to {@code false}, the AG
@@ -1029,7 +1040,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
android.Manifest.permission.BLUETOOTH_CONNECT,
android.Manifest.permission.BLUETOOTH_PRIVILEGED,
})
- public @AudioRouteAllowedReturnValues int setAudioRouteAllowed(boolean allowed) {
+ public @SetAudioRouteAllowedReturnValues int setAudioRouteAllowed(boolean allowed) {
if (VDBG) log("setAudioRouteAllowed");
final IBluetoothHeadset service = mService;
if (service == null) {
@@ -1068,7 +1079,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
android.Manifest.permission.BLUETOOTH_CONNECT,
android.Manifest.permission.BLUETOOTH_PRIVILEGED,
})
- public @AudioRouteAllowedReturnValues int getAudioRouteAllowed() {
+ public @GetAudioRouteAllowedReturnValues int getAudioRouteAllowed() {
if (VDBG) log("getAudioRouteAllowed");
final IBluetoothHeadset service = mService;
if (service == null) {