diff options
author | Jack He <siyuanh@google.com> | 2018-01-03 12:13:26 -0800 |
---|---|---|
committer | Jack He <siyuanh@google.com> | 2018-01-08 23:37:10 +0000 |
commit | 985cdcb88a262a905ddcc90b20177f2be292198b (patch) | |
tree | 12b018a7b3c5c10d22e4490e8efd9a0cf56a55bc /tools/aapt2/java/JavaClassGenerator.cpp | |
parent | 8d20f3d940db4292f60b4fe2e6fa6cc84df160cf (diff) |
HFP: Add APIs for set and get active device (1/3)
1. Call BluetoothHeadset.setActiveDevice(BluetoothDevice device) to set
a connected HFP/HSP device as active.
2. Listen for BluetoothHeadset.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. BluetoothHeadset.setActiveDevice() could be called by some other parts of
the system, so interested parties should always listen for
BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED intents and prepared
for active device updates.
Bug: 68951996
Test: manual
Change-Id: I22ca639a04fed7bf17df59c405ddeda90dafb8ff
(cherry picked from commit 05f4bc40743654ea501b18d70ee162a08b81b35c)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions