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

Commit 52f417ef authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "LE Audio: close GATT server properly" into tm-qpr-dev am: ceb25ac1

parents 78d8f8de ceb25ac1
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1387,12 +1387,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