Merge "Added internal API getMaxConnectedAudioDevices()" am: 877cbe1dc2

am: 18606e1601

Change-Id: I58199a6c70bfa03fc515c573b936c78ec34d61ac
This commit is contained in:
Pavlin Radoslavov
2018-01-18 02:18:03 +00:00
committed by android-build-merger

View File

@@ -1670,6 +1670,27 @@ public final class BluetoothAdapter {
return 0;
}
/**
* Get the maximum number of connected audio devices.
*
* @return the maximum number of connected audio devices
* @hide
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
public int getMaxConnectedAudioDevices() {
try {
mServiceLock.readLock().lock();
if (mService != null) {
return mService.getMaxConnectedAudioDevices();
}
} catch (RemoteException e) {
Log.e(TAG, "failed to get getMaxConnectedAudioDevices, error: ", e);
} finally {
mServiceLock.readLock().unlock();
}
return 1;
}
/**
* Return true if hardware has entries available for matching beacons
*