Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e9787fd authored by Johanna Ye's avatar Johanna Ye Committed by Automerger Merge Worker
Browse files

Merge "Add synchronization to all mDeviceBusy state changes." am: 744e835c

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1751221

Change-Id: I652d7bef485bca276c3315efec8f5ed647883b28
parents 40d7e0b9 744e835c
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -1153,7 +1153,9 @@ public final class BluetoothGatt implements BluetoothProfile {
                    characteristic.getInstanceId(), AUTHENTICATION_NONE);
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
            return false;
        }

@@ -1187,7 +1189,9 @@ public final class BluetoothGatt implements BluetoothProfile {
                    new ParcelUuid(uuid), startHandle, endHandle, AUTHENTICATION_NONE);
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
            return false;
        }

@@ -1234,7 +1238,9 @@ public final class BluetoothGatt implements BluetoothProfile {
                    AUTHENTICATION_NONE, characteristic.getValue());
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
            return false;
        }

@@ -1276,7 +1282,9 @@ public final class BluetoothGatt implements BluetoothProfile {
                    descriptor.getInstanceId(), AUTHENTICATION_NONE);
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
            return false;
        }

@@ -1317,7 +1325,9 @@ public final class BluetoothGatt implements BluetoothProfile {
                    AUTHENTICATION_NONE, descriptor.getValue());
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
            return false;
        }

@@ -1384,7 +1394,9 @@ public final class BluetoothGatt implements BluetoothProfile {
            mService.endReliableWrite(mClientIf, mDevice.getAddress(), true);
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
            return false;
        }