Remove connectivity dependency on Preconditions
Preconditions.checkNotNull is deprecated to be replaced by Objects.requireNonNull, and other methods can easily be replaced by inline checks. Preconditions is an internal API class that should not be used by unbundled jars. Bug: 177046265 Test: m Change-Id: If14a75439ff332c927dc4114ae0eecb89f53c6c7
This commit is contained in:
@@ -24,7 +24,6 @@ import android.os.Build;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.android.internal.util.Preconditions;
|
||||
import com.android.net.module.util.InetAddressUtils;
|
||||
|
||||
import java.net.InetAddress;
|
||||
@@ -153,7 +152,7 @@ public final class StaticIpConfiguration implements Parcelable {
|
||||
* @return The {@link Builder} for chaining.
|
||||
*/
|
||||
public @NonNull Builder setDnsServers(@NonNull Iterable<InetAddress> dnsServers) {
|
||||
Preconditions.checkNotNull(dnsServers);
|
||||
Objects.requireNonNull(dnsServers);
|
||||
mDnsServers = dnsServers;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user