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

Commit 52b8c0f0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Require calls to BluetoothA2dp#setBufferLengthMillis to pass a...

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

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1792153

Change-Id: I400cd575b38061d02cf6def535474ce1cfa6937c
parents 423dd00f cf2ef575
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()) {