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

Commit 304c51e4 authored by William Escande's avatar William Escande Committed by Automerger Merge Worker
Browse files

Merge "Add null check on getBluetoothGatt" into main am: ba498d07

parents 62ef8cd5 ba498d07
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);