OSDN Git Service

Added internal API to get/set the A2DP Active Device
authorPavlin Radoslavov <pavlin@google.com>
Tue, 19 Dec 2017 21:26:22 +0000 (13:26 -0800)
committerPavlin Radoslavov <pavlin@google.com>
Fri, 5 Jan 2018 21:43:31 +0000 (21:43 +0000)
commit5fd3e628218fd943468d9e5dbef9994e4cea222d
tree86b7b9864ce3eecf0922ddbdd92582bb522427ff
parent72804890b64b51ddb4fc562aaa0cce0322dce97a
Added internal API to get/set the A2DP Active Device

1. Call BluetoothA2dp.setActiveDevice(BluetoothDevice device) to set
   a connected A2DP device as active.
2. Listen for BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED intent
   that will contain the latest active device (in EXTRA_DEVICE field).
   If the active device could not be changed, the EXTRA_DEVICE
   field could be null.
3. If setActiveDevice() is NOT in-progress, BluetoothA2dp.getActiveDevice()
   can be used. If setActiveDevice() is in-progress, the result is undefined.
4. BluetoothA2dp.setActiveDevice() could be called by some other parts of
   the system, so interested parties should always listen for
   BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED intents and prepared
   for active device updates.

Bug: 71555243
Test: Manual
Change-Id: Ia25465e17a4539e940d09523cb621b230abd31e3
binder/android/bluetooth/IBluetoothA2dp.aidl