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

Commit f122481e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Replace com.android.internal.util.Preconditions.checkNotNull with...

Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull"
parents 2cd16a20 ce45b727
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -340,7 +340,7 @@ public final class BluetoothLeDeviceFilter implements DeviceFilter<ScanResult> {
        public Builder setRawDataFilter(@NonNull byte[] rawDataFilter,
                @Nullable byte[] rawDataFilterMask) {
            checkNotUsed();
            Preconditions.checkNotNull(rawDataFilter);
            Objects.requireNonNull(rawDataFilter);
            checkArgument(rawDataFilterMask == null ||
                    rawDataFilter.length == rawDataFilterMask.length,
                    "Mask and filter should be the same length");
+6 −8
Original line number Diff line number Diff line
@@ -16,9 +16,6 @@

package android.companion;


import static com.android.internal.util.Preconditions.checkNotNull;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
@@ -42,6 +39,7 @@ import android.util.Log;

import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.function.BiConsumer;

/**
@@ -150,8 +148,8 @@ public final class CompanionDeviceManager {
        if (!checkFeaturePresent()) {
            return;
        }
        checkNotNull(request, "Request cannot be null");
        checkNotNull(callback, "Callback cannot be null");
        Objects.requireNonNull(request, "Request cannot be null");
        Objects.requireNonNull(callback, "Callback cannot be null");
        try {
            mService.associate(
                    request,
@@ -278,9 +276,9 @@ public final class CompanionDeviceManager {
        if (!checkFeaturePresent()) {
            return false;
        }
        checkNotNull(packageName, "package name cannot be null");
        checkNotNull(macAddress, "mac address cannot be null");
        checkNotNull(user, "user cannot be null");
        Objects.requireNonNull(packageName, "package name cannot be null");
        Objects.requireNonNull(macAddress, "mac address cannot be null");
        Objects.requireNonNull(user, "user cannot be null");
        try {
            return mService.isDeviceAssociated(
                    packageName, macAddress.toString(), user.getIdentifier());