Merge "Fix the Preconditions dependency in EthernetNetworkSpecifier." am: bb27ba3b11 am: d86eb8579e am: 920a25595e am: 214a33b5d6

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952108

Change-Id: Iba502daec9ce72ff9f0075af010e789963d06b94
This commit is contained in:
Xiao Ma
2022-01-20 06:03:29 +00:00
committed by Automerger Merge Worker

View File

@@ -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;
} }