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

Commit db135d5f authored by David Duarte's avatar David Duarte
Browse files

BluetoothHearingAid: Rename result to defaultValue

Follow the pattern used in the other functions

Bug: 311713922
Test: m com.android.btservices
Change-Id: Ie1636f01265e199d0be70d93baeace9fb2c38ea6
parent 11caa367
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -912,7 +912,7 @@ public final class BluetoothHearingAid implements BluetoothProfile {
            Log.d(TAG, "getAdvertisementServiceData()");
        }
        final IBluetoothHearingAid service = getService();
        AdvertisementServiceData result = null;
        final AdvertisementServiceData defaultValue = null;
        if (service == null || !isEnabled() || !isValidDevice(device)) {
            Log.w(TAG, "Proxy not attached to service");
            if (DBG) {
@@ -923,12 +923,12 @@ public final class BluetoothHearingAid implements BluetoothProfile {
                final SynchronousResultReceiver<AdvertisementServiceData> recv =
                        SynchronousResultReceiver.get();
                service.getAdvertisementServiceData(device, mAttributionSource, recv);
                result = recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(null);
                return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
            } catch (RemoteException | TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            }
        }
        return result;
        return defaultValue;
    }

    /**