diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2022-02-23 17:07:29 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-02-23 17:07:29 +0000 |
commit | 47d67f1c36534ad8884a72fea01f43bb8d65e0e0 (patch) | |
tree | 0060b109c6bcb7055209aab299f3d1ba5192d154 /framework/java/android/bluetooth/BluetoothHeadset.java | |
parent | cc3b5dba8d0ccd787ece3069e07e051fb22ca967 (diff) | |
parent | 5e0e88fa6f1f86aa9e3358a4b20821ec925fdb66 (diff) |
Merge "get and set audio route allowed APIs should have different IntDef since they return different sets of values" am: fcc1bce477 am: 5e0e88fa6f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1991710
Change-Id: Iba1db3fde1b83aab81dc7bbdc737ba705499e7ed
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHeadset.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHeadset.java | 17 |
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) { |