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

Commit 06a99616 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "LE Audio: close GATT server properly"

parents 72e96e31 db6561f3
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1386,12 +1386,18 @@ public class MediaControlGattService implements MediaControlGattServiceInterface
        if (DBG) {
            Log.d(TAG, "Destroy");
        }
        if (mBluetoothGattServer != null
                && mBluetoothGattServer.removeService(mGattService)) {

        if (mBluetoothGattServer == null) {
            return;
        }

        if (mBluetoothGattServer.removeService(mGattService)) {
            if (mCallbacks != null) {
                mCallbacks.onServiceInstanceUnregistered(ServiceStatus.OK);
            }
        }

        mBluetoothGattServer.close();
    }

    @VisibleForTesting