summaryrefslogtreecommitdiffstats
path: root/core/java/android/server
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-03-29 00:01:34 -0700
committerJaikumar Ganesh <jaikumar@google.com>2010-03-30 10:23:55 -0700
commit0e09030977aea8b40fd177139528d4b5637c9771 (patch)
treecfcf8be747ad8e578871790330334502389506ed /core/java/android/server
parent7a17f0c04e0d09d003e6842f9af1d7cd0efc198f (diff)
downloadframeworks_base-0e09030977aea8b40fd177139528d4b5637c9771.zip
frameworks_base-0e09030977aea8b40fd177139528d4b5637c9771.tar.gz
frameworks_base-0e09030977aea8b40fd177139528d4b5637c9771.tar.bz2
Relax the requirement of making a DBUS call for creating the Bluez Device.
Bug: 2136464 When the bluez device is created, we get the onDeviceCreated signal. We add it to our cache when that happens. We can have a device created even when its not bonded - as a result of OPP. So use this cache to avoid a DBUS call to Bluez. Change-Id: I9465da7d72a12a6888128ff40ac1fe598cbae3c3
Diffstat (limited to 'core/java/android/server')
-rw-r--r--core/java/android/server/BluetoothService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index 2c73416..c0affd3 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;