Merge "Add AudioManager.setHearingAidDeviceConnectionState"

am: c3e842fde8

Change-Id: I22a01bb4170b126c59593f938f95bf382beb3dd6
This commit is contained in:
Andre Eisenbach
2018-02-22 22:44:11 +00:00
committed by android-build-merger
3 changed files with 22 additions and 0 deletions

View File

@@ -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. * Indicate A2DP source or sink connection state change.
* @param device Bluetooth device connected/disconnected * @param device Bluetooth device connected/disconnected

View File

@@ -143,6 +143,8 @@ interface IAudioService {
void setWiredDeviceConnectionState(int type, int state, String address, String name, void setWiredDeviceConnectionState(int type, int state, String address, String name,
String caller); String caller);
void setHearingAidDeviceConnectionState(in BluetoothDevice device, int state);
int setBluetoothA2dpDeviceConnectionState(in BluetoothDevice device, int state, int profile); int setBluetoothA2dpDeviceConnectionState(in BluetoothDevice device, int state, int profile);
void handleBluetoothA2dpDeviceConfigChange(in BluetoothDevice device); void handleBluetoothA2dpDeviceConfigChange(in BluetoothDevice device);

View File

@@ -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) public int setBluetoothA2dpDeviceConnectionState(BluetoothDevice device, int state, int profile)
{ {
return setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent( return setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(