Loading framework/java/android/bluetooth/BluetoothGatt.java +13 −12 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ public final class BluetoothGatt implements BluetoothProfile { private int mAuthRetryState; private int mConnState; private final Object mStateLock = new Object(); private final Object mDeviceBusyLock = new Object(); @UnsupportedAppUsage private Boolean mDeviceBusy = false; @UnsupportedAppUsage Loading Loading @@ -281,7 +282,7 @@ public final class BluetoothGatt implements BluetoothProfile { } } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } } Loading Loading @@ -356,7 +357,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -412,7 +413,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -495,7 +496,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -546,7 +547,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -595,7 +596,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -1097,7 +1098,7 @@ public final class BluetoothGatt implements BluetoothProfile { BluetoothDevice device = service.getDevice(); if (device == null) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1131,7 +1132,7 @@ public final class BluetoothGatt implements BluetoothProfile { if (VDBG) Log.d(TAG, "readUsingCharacteristicUuid() - uuid: " + uuid); if (mService == null || mClientIf == 0) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1177,7 +1178,7 @@ public final class BluetoothGatt implements BluetoothProfile { BluetoothDevice device = service.getDevice(); if (device == null) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1220,7 +1221,7 @@ public final class BluetoothGatt implements BluetoothProfile { BluetoothDevice device = service.getDevice(); if (device == null) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1261,7 +1262,7 @@ public final class BluetoothGatt implements BluetoothProfile { BluetoothDevice device = service.getDevice(); if (device == null) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1329,7 +1330,7 @@ public final class BluetoothGatt implements BluetoothProfile { if (VDBG) Log.d(TAG, "executeReliableWrite() - device: " + mDevice.getAddress()); if (mService == null || mClientIf == 0) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading
framework/java/android/bluetooth/BluetoothGatt.java +13 −12 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ public final class BluetoothGatt implements BluetoothProfile { private int mAuthRetryState; private int mConnState; private final Object mStateLock = new Object(); private final Object mDeviceBusyLock = new Object(); @UnsupportedAppUsage private Boolean mDeviceBusy = false; @UnsupportedAppUsage Loading Loading @@ -281,7 +282,7 @@ public final class BluetoothGatt implements BluetoothProfile { } } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } } Loading Loading @@ -356,7 +357,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -412,7 +413,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -495,7 +496,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -546,7 +547,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -595,7 +596,7 @@ public final class BluetoothGatt implements BluetoothProfile { return; } synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { mDeviceBusy = false; } Loading Loading @@ -1097,7 +1098,7 @@ public final class BluetoothGatt implements BluetoothProfile { BluetoothDevice device = service.getDevice(); if (device == null) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1131,7 +1132,7 @@ public final class BluetoothGatt implements BluetoothProfile { if (VDBG) Log.d(TAG, "readUsingCharacteristicUuid() - uuid: " + uuid); if (mService == null || mClientIf == 0) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1177,7 +1178,7 @@ public final class BluetoothGatt implements BluetoothProfile { BluetoothDevice device = service.getDevice(); if (device == null) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1220,7 +1221,7 @@ public final class BluetoothGatt implements BluetoothProfile { BluetoothDevice device = service.getDevice(); if (device == null) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1261,7 +1262,7 @@ public final class BluetoothGatt implements BluetoothProfile { BluetoothDevice device = service.getDevice(); if (device == null) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading Loading @@ -1329,7 +1330,7 @@ public final class BluetoothGatt implements BluetoothProfile { if (VDBG) Log.d(TAG, "executeReliableWrite() - device: " + mDevice.getAddress()); if (mService == null || mClientIf == 0) return false; synchronized (mDeviceBusy) { synchronized (mDeviceBusyLock) { if (mDeviceBusy) return false; mDeviceBusy = true; } Loading