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:
@@ -16,9 +16,11 @@
|
||||
|
||||
package android.telecom;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SdkConstant;
|
||||
import android.annotation.SystemApi;
|
||||
import android.app.Service;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Intent;
|
||||
import android.hardware.camera2.CameraManager;
|
||||
import android.net.Uri;
|
||||
@@ -376,6 +378,22 @@ public abstract class InCallService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request audio routing to a specific bluetooth device. Calling this method may result in
|
||||
* the device routing audio to a different bluetooth device than the one specified if the
|
||||
* bluetooth stack is unable to route audio to the requested device.
|
||||
* A list of available devices can be obtained via
|
||||
* {@link CallAudioState#getSupportedBluetoothDevices()}
|
||||
*
|
||||
* @param bluetoothAddress The address of the bluetooth device to connect to, as returned by
|
||||
* {@link BluetoothDevice#getAddress()}.
|
||||
*/
|
||||
public final void requestBluetoothAudio(@NonNull String bluetoothAddress) {
|
||||
if (mPhone != null) {
|
||||
mPhone.requestBluetoothAudio(bluetoothAddress);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked when the {@code Phone} has been created. This is a signal to the in-call experience
|
||||
* to start displaying in-call information to the user. Each instance of {@code InCallService}
|
||||
|
||||
Reference in New Issue
Block a user