OSDN Git Service

Change done to clear mUuid - local copy of Uuid. If not cleared, the cachedBluetoothD...
authorSreenidhi T <nidhit@broadcom.com>
Mon, 14 May 2012 09:32:30 +0000 (02:32 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Tue, 17 Jul 2012 05:06:46 +0000 (22:06 -0700)
Change-Id: Ida6fd2e805dee8c19b4d7d656b4102891f51fd00

src/com/android/bluetooth/btservice/RemoteDevices.java

index 08ef48a..8ba2b1c 100755 (executable)
@@ -178,6 +178,14 @@ final class RemoteDevices {
         void setBondState(int mBondState) {
             synchronized (mObject) {
                 this.mBondState = mBondState;
+                if (mBondState == BluetoothDevice.BOND_NONE)
+                {
+                    /* Clearing the Uuids local copy when the device is unpaired. If not cleared,
+                    cachedBluetoothDevice issued a connect using the local cached copy of uuids,
+                    without waiting for the ACTION_UUID intent.
+                    This was resulting in multiple calls to connect().*/
+                    mUuids = null;
+                }
             }
         }