AudioManager: Add communication device management APIs
Add new APIs to manage the audio device used for communication use cases (Cellular calls, VoIP and Video calls). These APIs are meant to replace specific APIs like setSpeakerPhoneOn() and provide a single generic way of configuring the audio device selected for calls. They will be used for newly added device types (e.g. BLE audio) instead of adding new specific APIs. They will also offer more options like for instance allowing to select the earpiece (handset) device when a wired headset is connected. The new APIs are: - boolean setDeviceForCommunication(AudioDeviceInfo) - void clearDeviceForCommunication() - AudioDeviceInfo getDeviceForCommunication() A listener is also added for applications to monitor current communication device selection: - OnCommunicationDeviceChangedListener As well as listener registration and unregistration APIs: - addOnCommunicationDeviceChangedListener() - removeOnCommunicationDeviceChangedListener() Bug: 161358428 Test: make && atest AudioCommunicationDeviceTest Change-Id: I8028d842e4a8ca1abe0f87d03e3c5d57c46b9362
Loading
Please register or sign in to comment