Update Telecom APIs to include multi-hfp

* Add bluetooth devices to CallAudioState
* Add methods for specifying a bluetooth device to InCallService
* Add methods for specifying a bluetooth device to Connection (for
self-managed connections)

Bug: 64767509
Test: unit tests
Change-Id: I286b19b423dc2ee417dbc90eda7e8055b2da2444
This commit is contained in:
Hall Liu
2017-11-07 17:59:28 -08:00
parent 3ddf22e69c
commit a98f58b5c1
14 changed files with 188 additions and 23 deletions

View File

@@ -520,11 +520,14 @@ final class ConnectionServiceAdapter implements DeathRecipient {
* @param callId The unique ID of the call.
* @param audioRoute The new audio route (see {@code CallAudioState#ROUTE_*}).
*/
void setAudioRoute(String callId, int audioRoute) {
Log.v(this, "setAudioRoute: %s %s", callId, CallAudioState.audioRouteToString(audioRoute));
void setAudioRoute(String callId, int audioRoute, String bluetoothAddress) {
Log.v(this, "setAudioRoute: %s %s %s", callId,
CallAudioState.audioRouteToString(audioRoute),
bluetoothAddress);
for (IConnectionServiceAdapter adapter : mAdapters) {
try {
adapter.setAudioRoute(callId, audioRoute, Log.getExternalSession());
adapter.setAudioRoute(callId, audioRoute,
bluetoothAddress, Log.getExternalSession());
} catch (RemoteException ignored) {
}
}