Merge "Fixed all APIs not meeting API review requirement"

This commit is contained in:
Treehugger Robot
2019-03-03 04:27:32 +00:00
committed by Gerrit Code Review

View File

@@ -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_SITE;
import static android.system.OsConstants.RT_SCOPE_UNIVERSE; import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
import android.annotation.NonNull;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.annotation.TestApi; import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage; import android.annotation.UnsupportedAppUsage;
@@ -177,7 +178,7 @@ public class LinkAddress implements Parcelable {
*/ */
@SystemApi @SystemApi
@TestApi @TestApi
public LinkAddress(InetAddress address, int prefixLength) { public LinkAddress(@NonNull InetAddress address, int prefixLength) {
this(address, prefixLength, 0, 0); this(address, prefixLength, 0, 0);
this.scope = scopeForUnicastAddress(address); 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 * 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. * "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 * @hide
*/ */
@SystemApi @SystemApi
@TestApi @TestApi
public LinkAddress(String address) { public LinkAddress(@NonNull String address) {
this(address, 0, 0); this(address, 0, 0);
this.scope = scopeForUnicastAddress(this.address); 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 * 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. * "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 flags The address flags.
* @param scope The address scope. * @param scope The address scope.
* @hide * @hide