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

Commit a30896ea authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "RequireNonNullElse replaced to use supplier" into main

parents 8457b6fa a3ad489e
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ import static android.Manifest.permission.BLUETOOTH_CONNECT;
import static android.Manifest.permission.BLUETOOTH_PRIVILEGED;

import static java.util.Objects.requireNonNull;
import static java.util.Objects.requireNonNullElse;
import static java.util.Objects.requireNonNullElseGet;

import android.bluetooth.BluetoothCsipSetCoordinator;
import android.bluetooth.BluetoothDevice;
@@ -122,8 +122,9 @@ public class HapClientService extends ProfileService {
        super(adapterService);
        mAdapterService = requireNonNull(adapterService);
        mHapClientNativeInterface =
                requireNonNullElse(
                requireNonNullElseGet(
                        nativeInterface,
                        () ->
                                new HapClientNativeInterface(
                                        new HapClientNativeCallback(adapterService, this)));
        mDatabaseManager = requireNonNull(mAdapterService.getDatabase());
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ public class BluetoothInCallService extends InCallService {

    private BluetoothInCallService(CallInfo callInfo) {
        Log.i(TAG, "BluetoothInCallService is created");
        mCallInfo = Objects.requireNonNullElse(callInfo, new CallInfo());
        mCallInfo = Objects.requireNonNullElseGet(callInfo, () -> new CallInfo());
        sInstance = this;
        mExecutor = Executors.newSingleThreadExecutor();
    }