Merge "Fix the Preconditions dependency in EthernetNetworkSpecifier."
This commit is contained in:
@@ -23,8 +23,6 @@ import android.os.Parcel;
|
|||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.android.internal.util.Preconditions;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +45,9 @@ public final class EthernetNetworkSpecifier extends NetworkSpecifier implements
|
|||||||
* @param interfaceName Name of the ethernet interface the specifier refers to.
|
* @param interfaceName Name of the ethernet interface the specifier refers to.
|
||||||
*/
|
*/
|
||||||
public EthernetNetworkSpecifier(@NonNull String interfaceName) {
|
public EthernetNetworkSpecifier(@NonNull String interfaceName) {
|
||||||
Preconditions.checkStringNotEmpty(interfaceName);
|
if (TextUtils.isEmpty(interfaceName)) {
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
}
|
||||||
mInterfaceName = interfaceName;
|
mInterfaceName = interfaceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user