Merge "Add nullability annotations" am: a1ee1fc888
am: 3d48153a8f
Change-Id: Ic81850c2976e7412e85856c5d1336f30d0691125
This commit is contained in:
@@ -3275,7 +3275,7 @@ package android.net {
|
||||
method @Nullable public String getDomains();
|
||||
method @Nullable public java.net.InetAddress getGateway();
|
||||
method @Nullable public android.net.LinkAddress getIpAddress();
|
||||
method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(String);
|
||||
method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(@Nullable String);
|
||||
method public void setDomains(@Nullable String);
|
||||
method public void setGateway(@Nullable java.net.InetAddress);
|
||||
method public void setIpAddress(@Nullable android.net.LinkAddress);
|
||||
@@ -3495,7 +3495,7 @@ package android.net.metrics {
|
||||
}
|
||||
|
||||
public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event {
|
||||
method public static String getProbeName(int);
|
||||
method @NonNull public static String getProbeName(int);
|
||||
field public static final int DNS_FAILURE = 0; // 0x0
|
||||
field public static final int DNS_SUCCESS = 1; // 0x1
|
||||
field public static final int PROBE_DNS = 0; // 0x0
|
||||
|
||||
@@ -695,7 +695,7 @@ package android.net {
|
||||
method @Nullable public String getDomains();
|
||||
method @Nullable public java.net.InetAddress getGateway();
|
||||
method @Nullable public android.net.LinkAddress getIpAddress();
|
||||
method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(String);
|
||||
method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(@Nullable String);
|
||||
method public void setDomains(@Nullable String);
|
||||
method public void setGateway(@Nullable java.net.InetAddress);
|
||||
method public void setIpAddress(@Nullable android.net.LinkAddress);
|
||||
@@ -914,7 +914,7 @@ package android.net.metrics {
|
||||
}
|
||||
|
||||
public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event {
|
||||
method public static String getProbeName(int);
|
||||
method @NonNull public static String getProbeName(int);
|
||||
field public static final int DNS_FAILURE = 0; // 0x0
|
||||
field public static final int DNS_SUCCESS = 1; // 0x1
|
||||
field public static final int PROBE_DNS = 0; // 0x0
|
||||
|
||||
@@ -134,7 +134,7 @@ public final class StaticIpConfiguration implements Parcelable {
|
||||
* route to the gateway as well. This configuration is arguably invalid, but it used to work
|
||||
* in K and earlier, and other OSes appear to accept it.
|
||||
*/
|
||||
public @NonNull List<RouteInfo> getRoutes(String iface) {
|
||||
public @NonNull List<RouteInfo> getRoutes(@Nullable String iface) {
|
||||
List<RouteInfo> routes = new ArrayList<RouteInfo>(3);
|
||||
if (ipAddress != null) {
|
||||
RouteInfo connectedRoute = new RouteInfo(ipAddress, null, iface);
|
||||
|
||||
@@ -153,11 +153,14 @@ public final class ValidationProbeEvent implements IpConnectivityLog.Event {
|
||||
return (probeType & 0xff) | (firstValidation ? FIRST_VALIDATION : REVALIDATION);
|
||||
}
|
||||
|
||||
public static String getProbeName(int probeType) {
|
||||
/**
|
||||
* Get the name of a probe specified by its probe type.
|
||||
*/
|
||||
public static @NonNull String getProbeName(int probeType) {
|
||||
return Decoder.constants.get(probeType & 0xff, "PROBE_???");
|
||||
}
|
||||
|
||||
private static String getValidationStage(int probeType) {
|
||||
private static @NonNull String getValidationStage(int probeType) {
|
||||
return Decoder.constants.get(probeType & 0xff00, "UNKNOWN");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user