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

Commit b6a2beb6 authored by Jack He's avatar Jack He Committed by Gerrit Code Review
Browse files

Merge "Fix unregistering callbacks"

parents fdb9570d 78bd201c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -601,7 +601,7 @@ public final class BluetoothHapClient implements BluetoothProfile, AutoCloseable
        if (DBG) log("unregisterCallback");

        synchronized (mCallbackExecutorMap) {
            if (mCallbackExecutorMap.remove(callback) != null) {
            if (mCallbackExecutorMap.remove(callback) == null) {
                throw new IllegalArgumentException("This callback has not been registered");
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -1002,7 +1002,7 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
        if (DBG) log("unregisterCallback");

        synchronized (mCallbackExecutorMap) {
            if (mCallbackExecutorMap.remove(callback) != null) {
            if (mCallbackExecutorMap.remove(callback) == null) {
                throw new IllegalArgumentException("This callback has not been registered");
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -485,7 +485,7 @@ public final class BluetoothLeBroadcast implements AutoCloseable, BluetoothProfi
        if (DBG) log("unregisterCallback");

        synchronized (mCallbackExecutorMap) {
            if (mCallbackExecutorMap.remove(callback) != null) {
            if (mCallbackExecutorMap.remove(callback) == null) {
                throw new IllegalArgumentException("This callback has not been registered");
            }
        }