diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index 2c7341699d3bb..c0affd3755d6a 100644 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -1406,7 +1406,9 @@ public class BluetoothService extends IBluetooth.Stub { } boolean ret; - if (getBondState(address) == BluetoothDevice.BOND_BONDED) { + // Just do the SDP if the device is already created and UUIDs are not + // NULL, else create the device and then do SDP. + if (isRemoteDeviceInCache(address) && getRemoteUuids(address) != null) { String path = getObjectPathFromAddress(address); if (path == null) return false;