diff options
author | Sanket Agarwal <sanketa@google.com> | 2015-10-21 18:23:27 -0700 |
---|---|---|
committer | Sanket Agarwal <sanketa@google.com> | 2016-01-14 21:59:33 +0000 |
commit | 25e84d4f5d76fdb421c597752117089b6c73e5b7 (patch) | |
tree | a581bde26acec25e90f29265254ac887f04aef98 /framework/java/android/bluetooth/BluetoothClass.java | |
parent | 4c9ad00c777847f2fb1d00b870e8c6e573985b7f (diff) |
Add support for AVRCP 1.3.
* Add metadata support.
* Add player settings support.
* Add playback support.
A2DP Settings App support.
Bluetooth: A2DP Sink support for Settings App
- add support for A2DP Sink in Settings App. This will enable connection
initiation and updation on Settings App
- add framework Apis to support A2DP Sink. Any third party Apps can access
A2DP Sink priority of device and playing state of device
- add support for key to set priority. This manages priority of device for
A2DP Sink profile
Change-Id: If5f9139f37cdb9d200387877c7801075205c78a0
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothClass.java')
-rwxr-xr-x[-rw-r--r--] | framework/java/android/bluetooth/BluetoothClass.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothClass.java b/framework/java/android/bluetooth/BluetoothClass.java index 54bf4afa93..4a38287e7c 100644..100755 --- a/framework/java/android/bluetooth/BluetoothClass.java +++ b/framework/java/android/bluetooth/BluetoothClass.java @@ -283,6 +283,8 @@ public final class BluetoothClass implements Parcelable { public static final int PROFILE_PANU = 4; /** @hide */ public static final int PROFILE_NAP = 5; + /** @hide */ + public static final int PROFILE_A2DP_SINK = 6; /** * Check class bits for possible bluetooth profile support. @@ -310,6 +312,21 @@ public final class BluetoothClass implements Parcelable { default: return false; } + } else if (profile == PROFILE_A2DP_SINK) { + if (hasService(Service.CAPTURE)) { + return true; + } + // By the A2DP spec, srcs must indicate the CAPTURE service. + // However if some device that do not, we try to + // match on some other class bits. + switch (getDeviceClass()) { + case Device.AUDIO_VIDEO_HIFI_AUDIO: + case Device.AUDIO_VIDEO_SET_TOP_BOX: + case Device.AUDIO_VIDEO_VCR : + return true; + default: + return false; + } } else if (profile == PROFILE_HEADSET) { // The render service class is required by the spec for HFP, so is a // pretty good signal |