summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothGatt.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothGatt.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothGatt.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/framework/java/android/bluetooth/BluetoothGatt.java b/framework/java/android/bluetooth/BluetoothGatt.java
index aea82102ca..2f771e9d3b 100644
--- a/framework/java/android/bluetooth/BluetoothGatt.java
+++ b/framework/java/android/bluetooth/BluetoothGatt.java
@@ -1190,7 +1190,9 @@ public final class BluetoothGatt implements BluetoothProfile {
characteristic.getInstanceId(), AUTHENTICATION_NONE, mAttributionSource);
} catch (RemoteException e) {
Log.e(TAG, "", e);
- mDeviceBusy = false;
+ synchronized (mDeviceBusyLock) {
+ mDeviceBusy = false;
+ }
return false;
}
@@ -1226,7 +1228,9 @@ public final class BluetoothGatt implements BluetoothProfile {
mAttributionSource);
} catch (RemoteException e) {
Log.e(TAG, "", e);
- mDeviceBusy = false;
+ synchronized (mDeviceBusyLock) {
+ mDeviceBusy = false;
+ }
return false;
}
@@ -1274,7 +1278,9 @@ public final class BluetoothGatt implements BluetoothProfile {
AUTHENTICATION_NONE, characteristic.getValue(), mAttributionSource);
} catch (RemoteException e) {
Log.e(TAG, "", e);
- mDeviceBusy = false;
+ synchronized (mDeviceBusyLock) {
+ mDeviceBusy = false;
+ }
return false;
}
@@ -1317,7 +1323,9 @@ public final class BluetoothGatt implements BluetoothProfile {
descriptor.getInstanceId(), AUTHENTICATION_NONE, mAttributionSource);
} catch (RemoteException e) {
Log.e(TAG, "", e);
- mDeviceBusy = false;
+ synchronized (mDeviceBusyLock) {
+ mDeviceBusy = false;
+ }
return false;
}
@@ -1359,7 +1367,9 @@ public final class BluetoothGatt implements BluetoothProfile {
AUTHENTICATION_NONE, descriptor.getValue(), mAttributionSource);
} catch (RemoteException e) {
Log.e(TAG, "", e);
- mDeviceBusy = false;
+ synchronized (mDeviceBusyLock) {
+ mDeviceBusy = false;
+ }
return false;
}
@@ -1428,7 +1438,9 @@ public final class BluetoothGatt implements BluetoothProfile {
mService.endReliableWrite(mClientIf, mDevice.getAddress(), true, mAttributionSource);
} catch (RemoteException e) {
Log.e(TAG, "", e);
- mDeviceBusy = false;
+ synchronized (mDeviceBusyLock) {
+ mDeviceBusy = false;
+ }
return false;
}