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

Commit d2ef8d7c authored by Rahul Sabnis's avatar Rahul Sabnis Committed by Gerrit Code Review
Browse files

Merge "BluetoothHeadset#getAudioState now throws a NullPointerException if the...

Merge "BluetoothHeadset#getAudioState now throws a NullPointerException if the device param is null."
parents f8e93753 9a5e351f
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeoutException;

/**
@@ -930,7 +931,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
     *
     * @param device is the Bluetooth device for which the audio state is being queried
     * @return the audio state of the device or an error code
     * @throws IllegalArgumentException if the device is null
     * @throws NullPointerException if the device is null
     *
     * @hide
     */
@@ -942,9 +943,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
    })
    public @GetAudioStateReturnValues int getAudioState(@NonNull BluetoothDevice device) {
        if (VDBG) log("getAudioState");
        if (device == null) {
            throw new IllegalArgumentException("device cannot be null");
        }
        Objects.requireNonNull(device);
        final IBluetoothHeadset service = mService;
        final int defaultValue = BluetoothHeadset.STATE_AUDIO_DISCONNECTED;
        if (service == null) {