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

Commit 9edcfd40 authored by Angela Wang's avatar Angela Wang
Browse files

BluetoothVolumeControl: isVolumeOffsetAvailable() return wrong value

The value is not correctly returned. It'll always return false.

Bug: 323342069
Test: m Bluetooth
Tag: #feature
Flag: EXEMPT, simple bug fix
Change-Id: Ibc0bea64d04e5f383c5ef5ed6bf7b4d7b2053897
parent 29ff541d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -515,9 +515,9 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose

        final boolean defaultValue = false;
        try {
            final SynchronousResultReceiver recv = SynchronousResultReceiver.get();
            final SynchronousResultReceiver<Boolean> recv = SynchronousResultReceiver.get();
            service.isVolumeOffsetAvailable(device, mAttributionSource, recv);
            recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
            return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
        } catch (RemoteException | TimeoutException e) {
            Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
        }