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

Commit cf2ef575 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Require calls to BluetoothA2dp#setBufferLengthMillis to pass a non-negative value"

parents 5a5c3d75 465f4894
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -946,6 +946,10 @@ public final class BluetoothA2dp implements BluetoothProfile {
    public boolean setBufferLengthMillis(@BluetoothCodecConfig.SourceCodecType int codec,
            int value) {
        if (VDBG) log("setBufferLengthMillis(" + codec + ", " + value + ")");
        if (value < 0) {
            Log.e(TAG, "Trying to set audio buffer length to a negative value: " + value);
            return false;
        }
        try {
            final IBluetoothA2dp service = getService();
            if (service != null && isEnabled()) {