From 9fc82e3a8679f1dde09fad9dfd6bf40eb448ba20 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Fri, 1 Mar 2019 12:04:50 -0800 Subject: [PATCH] Fixed all APIs not meeting API review requirement To address the API review feedback provided by the API council. Bug: 126702995 Bug: 126701710 Bug: 126702357 Bug: 126701113 Bug: 126701239 Bug: 126700713 Bug: 126700064 Test: Manual Change-Id: I4b902c1fc2c09133022b05dacdda8964436205d2 --- core/java/android/net/LinkAddress.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/java/android/net/LinkAddress.java b/core/java/android/net/LinkAddress.java index 8d779aaa23..8b01960880 100644 --- a/core/java/android/net/LinkAddress.java +++ b/core/java/android/net/LinkAddress.java @@ -25,6 +25,7 @@ import static android.system.OsConstants.RT_SCOPE_LINK; import static android.system.OsConstants.RT_SCOPE_SITE; import static android.system.OsConstants.RT_SCOPE_UNIVERSE; +import android.annotation.NonNull; import android.annotation.SystemApi; import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; @@ -177,7 +178,7 @@ public class LinkAddress implements Parcelable { */ @SystemApi @TestApi - public LinkAddress(InetAddress address, int prefixLength) { + public LinkAddress(@NonNull InetAddress address, int prefixLength) { this(address, prefixLength, 0, 0); this.scope = scopeForUnicastAddress(address); } @@ -196,12 +197,12 @@ public class LinkAddress implements Parcelable { /** * Constructs a new {@code LinkAddress} from a string such as "192.0.2.5/24" or * "2001:db8::1/64". The flags are set to zero and the scope is determined from the address. - * @param string The string to parse. + * @param address The string to parse. * @hide */ @SystemApi @TestApi - public LinkAddress(String address) { + public LinkAddress(@NonNull String address) { this(address, 0, 0); this.scope = scopeForUnicastAddress(this.address); } @@ -209,7 +210,7 @@ public class LinkAddress implements Parcelable { /** * Constructs a new {@code LinkAddress} from a string such as "192.0.2.5/24" or * "2001:db8::1/64", with the specified flags and scope. - * @param string The string to parse. + * @param address The string to parse. * @param flags The address flags. * @param scope The address scope. * @hide