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

Commit ba498d07 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "Add null check on getBluetoothGatt" into main

parents 11a3bcfd 73c3e5b1
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -550,9 +550,12 @@ public final class BluetoothLeAdvertiser {
            return;
        }

        IBluetoothGatt gatt;
        IBluetoothGatt gatt = mBluetoothAdapter.getBluetoothGatt();
        if (gatt == null) {
            Log.e(TAG, "Bluetooth GATT is null");
            return;
        }
        try {
            gatt = mBluetoothAdapter.getBluetoothGatt();
            final SynchronousResultReceiver recv = SynchronousResultReceiver.get();
            gatt.stopAdvertisingSet(wrapped, mAttributionSource, recv);
            recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);