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

Commit 03fc6115 authored by William Escande's avatar William Escande Committed by Automerger Merge Worker
Browse files

Merge "VolumeControl: Early return in unregisterCallback" into main am: 7ccc74f3

parents 46ef4fea 7ccc74f3
Loading
Loading
Loading
Loading
+15 −13
Original line number Diff line number Diff line
@@ -604,8 +604,11 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose
            }
        }

        if (!mCallbackExecutorMap.isEmpty()) {
            return;
        }

        // If the callback map is empty, we unregister the service-to-app callback
        if (mCallbackExecutorMap.isEmpty()) {
        try {
            final IBluetoothVolumeControl service = getService();
            if (service != null) {
@@ -620,7 +623,6 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose
            Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
        }
    }
    }

    /**
     * Tells the remote device to set a volume offset to the absolute volume.