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

Commit 7bd3fa33 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 am: 8e9787fd

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

Change-Id: I3ecb6ae4c51c4a843be0eb265825966c8afb42ae
parents 06537bd4 8e9787fd
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -1190,7 +1190,9 @@ public final class BluetoothGatt implements BluetoothProfile {
                    characteristic.getInstanceId(), AUTHENTICATION_NONE, mAttributionSource);
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
            return false;
        }

@@ -1226,7 +1228,9 @@ public final class BluetoothGatt implements BluetoothProfile {
                    mAttributionSource);
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
            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);
            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);
            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);
            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);
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
            return false;
        }