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

Commit 1d5d4bae authored by William Escande's avatar William Escande
Browse files

VolumeControl: Early return in unregisterCallback

replaced:
```
if (foo) {
  /*
  * long code
  */
}
```
by
```
if (!bar) {
  return;
}
/*
* long code
*/
```

To win some indent spaces

Bug: 324492914
Test: m Bluetooth | Existing test
Flag: Exempt, mechanical no-op
Change-Id: Ib735d03f1ea14547aae9213b6f7abc3362ff1338
parent b6d8b917
Loading
Loading
Loading
Loading
+15 −13
Original line number Diff line number Diff line
@@ -604,8 +604,11 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose
            }
        }

        if (!mCallbackExecutorMap.isEmpty()) {
            return;
        }

        // If the callback map is empty, we unregister the service-to-app callback
        if (mCallbackExecutorMap.isEmpty()) {
        try {
            final IBluetoothVolumeControl service = getService();
            if (service != null) {
@@ -620,7 +623,6 @@ public final class BluetoothVolumeControl implements BluetoothProfile, AutoClose
            Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
        }
    }
    }

    /**
     * Tells the remote device to set a volume offset to the absolute volume.