Add AudioManager.setHearingAidDeviceConnectionState
This will be used by Bluetooth to notify audio framework when Hearing Aid is connected or disconnected. Bug: 69623109 Test: mm Change-Id: I5664d8bd20e36601eea815c0d6e55c3b1d49e4ea
This commit is contained in:
@@ -3605,6 +3605,21 @@ public class AudioManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate Hearing Aid connection state change.
|
||||
* @param device Bluetooth device connected/disconnected
|
||||
* @param state new connection state (BluetoothProfile.STATE_xxx)
|
||||
* {@hide}
|
||||
*/
|
||||
public void setHearingAidDeviceConnectionState(BluetoothDevice device, int state) {
|
||||
final IAudioService service = getService();
|
||||
try {
|
||||
service.setHearingAidDeviceConnectionState(device, state);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate A2DP source or sink connection state change.
|
||||
* @param device Bluetooth device connected/disconnected
|
||||
|
||||
@@ -143,6 +143,8 @@ interface IAudioService {
|
||||
void setWiredDeviceConnectionState(int type, int state, String address, String name,
|
||||
String caller);
|
||||
|
||||
void setHearingAidDeviceConnectionState(in BluetoothDevice device, int state);
|
||||
|
||||
int setBluetoothA2dpDeviceConnectionState(in BluetoothDevice device, int state, int profile);
|
||||
|
||||
void handleBluetoothA2dpDeviceConfigChange(in BluetoothDevice device);
|
||||
|
||||
@@ -4104,6 +4104,11 @@ public class AudioService extends IAudioService.Stub
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHearingAidDeviceConnectionState(BluetoothDevice device, int state)
|
||||
{
|
||||
}
|
||||
|
||||
public int setBluetoothA2dpDeviceConnectionState(BluetoothDevice device, int state, int profile)
|
||||
{
|
||||
return setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(
|
||||
|
||||
Reference in New Issue
Block a user