summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2019-03-25 13:19:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-03-25 13:19:19 +0000
commita1ee1fc888e8d69bbf6fc0be483594325530cd97 (patch)
tree0c6986ce74c6b3adc18d08aec84fd62da1a658af /core/java/android
parent6aef2afd4efaa00bdebb4adafeddd9164cd32818 (diff)
parent45ecef3b4c16aa5afd97d514604a7d21c2f0b6a1 (diff)
Merge "Add nullability annotations"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/net/StaticIpConfiguration.java2
-rw-r--r--core/java/android/net/metrics/ValidationProbeEvent.java7
2 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/net/StaticIpConfiguration.java b/core/java/android/net/StaticIpConfiguration.java
index 0728d83cbdb1..14dbca0183f0 100644
--- a/core/java/android/net/StaticIpConfiguration.java
+++ b/core/java/android/net/StaticIpConfiguration.java
@@ -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);
diff --git a/core/java/android/net/metrics/ValidationProbeEvent.java b/core/java/android/net/metrics/ValidationProbeEvent.java
index 9eb87ef43cbb..ebca7e6d5607 100644
--- a/core/java/android/net/metrics/ValidationProbeEvent.java
+++ b/core/java/android/net/metrics/ValidationProbeEvent.java
@@ -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");
}