summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHeadset.java
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-02-23 17:01:21 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-23 17:01:21 +0000
commit5e0e88fa6f1f86aa9e3358a4b20821ec925fdb66 (patch)
treed99b125121ea45dae454184b4ee6b15a3184f849 /framework/java/android/bluetooth/BluetoothHeadset.java
parent10511ac9564c01910a5443c0ade2c2e715cba3d0 (diff)
parentfcc1bce477415de2a792ffa2a1c701ea962627af (diff)
Merge "get and set audio route allowed APIs should have different IntDef since they return different sets of values" am: fcc1bce477
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1991710 Change-Id: Id0bf749887b9ff925475cc23ce1d66d0c1a701f2
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 c1103ac33a..9fd29de7a3 100644
--- a/framework/java/android/bluetooth/BluetoothHeadset.java
+++ b/framework/java/android/bluetooth/BluetoothHeadset.java
@@ -951,10 +951,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
@@ -975,7 +986,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) {
@@ -1014,7 +1025,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) {