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

Commit 1845c212 authored by Mark Chien's avatar Mark Chien Committed by Automerger Merge Worker
Browse files

Merge "Remove Preconditions usage from moduleutils and IpClient" into rvc-dev am: 90b9ebe5

Change-Id: I77b60ec479420d45fd4fc4a37130e4e95bad1d6d
parents c041bf13 90b9ebe5
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package android.net.util;

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

import android.net.MacAddress;
import android.text.TextUtils;

@@ -66,8 +64,12 @@ public class InterfaceParams {
    }

    public InterfaceParams(String name, int index, MacAddress macAddr, int defaultMtu) {
        checkArgument((!TextUtils.isEmpty(name)), "impossible interface name");
        checkArgument((index > 0), "invalid interface index");
        if (TextUtils.isEmpty(name)) {
            throw new IllegalArgumentException("impossible interface name");
        }

        if (index <= 0) throw new IllegalArgumentException("invalid interface index");

        this.name = name;
        this.index = index;
        this.hasMacAddress = (macAddr != null);
+2 −3
Original line number Diff line number Diff line
@@ -74,7 +74,6 @@ import com.android.internal.util.HexDump;
import com.android.internal.util.IState;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.MessageUtils;
import com.android.internal.util.Preconditions;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
import com.android.internal.util.WakeupMessage;
@@ -549,8 +548,8 @@ public class IpClient extends StateMachine {
            NetworkObserverRegistry observerRegistry, NetworkStackServiceManager nssManager,
            Dependencies deps) {
        super(IpClient.class.getSimpleName() + "." + ifName);
        Preconditions.checkNotNull(ifName);
        Preconditions.checkNotNull(callback);
        Objects.requireNonNull(ifName);
        Objects.requireNonNull(callback);

        mTag = getName();