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

Commit 91789e45 authored by Rahul Sabnis's avatar Rahul Sabnis 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" into sc-dev am: 7a3cb23b am: 339b2e4e

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

Change-Id: Iec19374f348d80cd43d93efa87fc7ebaca9f2542
parents aa1642d8 339b2e4e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1025,6 +1025,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()) {