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: I860d1aba716d75856c3e9e022948a1b4b3be18bf
Loading
Please register or sign in to comment