Merge "Add documentation on EthernetNetworkSpecifier API" am: 682a98d823 am: f00ac501f4 am: d74319d883
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669186 Change-Id: I350d4b3d3c3b146f48480475a21b5dbe718ffc36
This commit is contained in:
@@ -42,15 +42,22 @@ public final class EthernetNetworkSpecifier extends NetworkSpecifier implements
|
|||||||
@NonNull
|
@NonNull
|
||||||
private final String mInterfaceName;
|
private final String mInterfaceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new EthernetNetworkSpecifier.
|
||||||
|
* @param interfaceName Name of the ethernet interface the specifier refers to.
|
||||||
|
*/
|
||||||
public EthernetNetworkSpecifier(@NonNull String interfaceName) {
|
public EthernetNetworkSpecifier(@NonNull String interfaceName) {
|
||||||
Preconditions.checkStringNotEmpty(interfaceName);
|
Preconditions.checkStringNotEmpty(interfaceName);
|
||||||
mInterfaceName = interfaceName;
|
mInterfaceName = interfaceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This may be null in the future to support specifiers based on data other than the interface
|
/**
|
||||||
// name.
|
* Get the name of the ethernet interface the specifier refers to.
|
||||||
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getInterfaceName() {
|
public String getInterfaceName() {
|
||||||
|
// This may be null in the future to support specifiers based on data other than the
|
||||||
|
// interface name.
|
||||||
return mInterfaceName;
|
return mInterfaceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user