Skip to content
Snippets Groups Projects
Commit ceb25ac1 authored by Jack He's avatar Jack He Committed by Android (Google) Code Review
Browse files

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

parents 73517ade 364b10bc
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment