diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-02-24 02:09:19 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-02-24 02:09:19 +0000 |
commit | 534606740a1c019b200b5315a3ffa7f13fe63758 (patch) | |
tree | 29a988097b062d25fb234da1d6a8e6b9aa2dc7db /framework/java/android/bluetooth/BluetoothHeadset.java | |
parent | 6d7a5eb23292b0150bd2a5c2fe9fee9c1f8f8a87 (diff) | |
parent | 3dace96e9057efc3473b6c82c3d21f90908141d6 (diff) |
Snap for 8215675 from 3dace96e9057efc3473b6c82c3d21f90908141d6 to tm-release
Change-Id: I402e815b34bf106517103402a4ab92efe11754fc
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 4e57c59643..d5af45b172 100644 --- a/framework/java/android/bluetooth/BluetoothHeadset.java +++ b/framework/java/android/bluetooth/BluetoothHeadset.java @@ -947,10 +947,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 @@ -971,7 +982,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) { @@ -1010,7 +1021,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) { |