diff --git a/core/java/android/net/INetworkManagementEventObserver.aidl b/core/java/android/net/INetworkManagementEventObserver.aidl index 405a897a90041..5b16f8b3e5817 100644 --- a/core/java/android/net/INetworkManagementEventObserver.aidl +++ b/core/java/android/net/INetworkManagementEventObserver.aidl @@ -57,24 +57,20 @@ interface INetworkManagementEventObserver { /** - * An interface address has been added or updated + * An interface address has been added or updated. * - * @param address The address. * @param iface The interface. - * @param flags The address flags. - * @param scope The address scope. + * @param address The address. */ - void addressUpdated(in LinkAddress address, String iface, int flags, int scope); + void addressUpdated(String iface, in LinkAddress address); /** - * An interface address has been removed + * An interface address has been removed. * - * @param address The address. * @param iface The interface. - * @param flags The address flags. - * @param scope The address scope. + * @param address The address. */ - void addressRemoved(in LinkAddress address, String iface, int flags, int scope); + void addressRemoved(String iface, in LinkAddress address); /** * A networking quota limit has been reached. The quota might not diff --git a/core/java/android/net/LinkAddress.java b/core/java/android/net/LinkAddress.java index 570b6fe5be0e1..22543e3ef1569 100644 --- a/core/java/android/net/LinkAddress.java +++ b/core/java/android/net/LinkAddress.java @@ -24,8 +24,32 @@ import java.net.InetAddress; import java.net.InterfaceAddress; import java.net.UnknownHostException; +import static libcore.io.OsConstants.IFA_F_DADFAILED; +import static libcore.io.OsConstants.IFA_F_DEPRECATED; +import static libcore.io.OsConstants.IFA_F_TENTATIVE; +import static libcore.io.OsConstants.RT_SCOPE_HOST; +import static libcore.io.OsConstants.RT_SCOPE_LINK; +import static libcore.io.OsConstants.RT_SCOPE_SITE; +import static libcore.io.OsConstants.RT_SCOPE_UNIVERSE; + /** * Identifies an IP address on a network link. + * + * A {@code LinkAddress} consists of: + *