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

Commit 383ef540 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge changes I1f2ddba7,Ifc48df4a,Ide3334aa into main

* changes:
  VolumeControl: Fix wrong data type
  VolumeControl: Remove impossible null check
  VolumeControl: Early return in onServiceConnected
parents dd94bd05 58cafe13
Loading
Loading
Loading
Loading
+11 −16
Original line number Diff line number Diff line
@@ -294,25 +294,20 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose
        mService = IBluetoothVolumeControl.Stub.asInterface(service);
        // re-register the service-to-app callback
        synchronized (mCallbackExecutorMap) {
            if (!mCallbackExecutorMap.isEmpty()) {
            if (mCallbackExecutorMap.isEmpty()) {
                return;
            }
            try {
                    if (service != null) {
                        final SynchronousResultReceiver<Integer> recv =
                                SynchronousResultReceiver.get();
                final SynchronousResultReceiver<Void> recv = SynchronousResultReceiver.get();
                mService.registerCallback(mCallback, mAttributionSource, recv);
                recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);
                    }
            } catch (RemoteException e) {
                    Log.e(
                            TAG,
                            "onBluetoothServiceUp: Failed to register" + "Volume Control callback",
                            e);
                Log.e(TAG, "onBluetoothServiceUp: Failed to register VolumeControl callback", e);
            } catch (TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            }
        }
    }
    }

    /** @hide */
    @Override