diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index 68eba6e45fdd2..acfc0d70b4992 100644 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -1240,7 +1240,8 @@ public class BluetoothService extends IBluetooth.Stub { "Need BLUETOOTH_ADMIN permission"); String objectPath = getObjectPathFromAddress(device.getAddress()); - if (objectPath == null || getConnectedInputDevices().length != 0 || + if (objectPath == null || + getInputDeviceState(device) != BluetoothInputDevice.STATE_DISCONNECTED || getInputDevicePriority(device) == BluetoothInputDevice.PRIORITY_OFF) { return false; }