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

Commit a1ee1fc8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add nullability annotations"

parents 6aef2afd 45ecef3b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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);
+5 −2
Original line number Diff line number Diff line
@@ -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");
    }