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

Commit 0b054b85 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "RequireNonNullElse replaced to use supplier" into main am: a30896ea

parents a450781f a30896ea
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();
    }