Merge "Make IpNeighborMonitor#NeighborEvent member as public immutable."
diff --git a/staticlibs/device/com/android/net/module/util/ip/IpNeighborMonitor.java b/staticlibs/device/com/android/net/module/util/ip/IpNeighborMonitor.java
index 88f8c9d..4a61794 100644
--- a/staticlibs/device/com/android/net/module/util/ip/IpNeighborMonitor.java
+++ b/staticlibs/device/com/android/net/module/util/ip/IpNeighborMonitor.java
@@ -22,6 +22,7 @@
import static com.android.net.module.util.netlink.NetlinkConstants.hexify;
import static com.android.net.module.util.netlink.NetlinkConstants.stringForNlMsgType;
+import android.annotation.NonNull;
import android.net.MacAddress;
import android.os.Handler;
import android.system.ErrnoException;
@@ -80,15 +81,17 @@
* An event about a neighbor.
*/
public static class NeighborEvent {
- final long elapsedMs;
- final short msgType;
- final int ifindex;
- final InetAddress ip;
- final short nudState;
- final MacAddress macAddr;
+ public final long elapsedMs;
+ public final short msgType;
+ public final int ifindex;
+ @NonNull
+ public final InetAddress ip;
+ public final short nudState;
+ @NonNull
+ public final MacAddress macAddr;
- public NeighborEvent(long elapsedMs, short msgType, int ifindex, InetAddress ip,
- short nudState, MacAddress macAddr) {
+ public NeighborEvent(long elapsedMs, short msgType, int ifindex, @NonNull InetAddress ip,
+ short nudState, @NonNull MacAddress macAddr) {
this.elapsedMs = elapsedMs;
this.msgType = msgType;
this.ifindex = ifindex;
@@ -101,7 +104,7 @@
return (msgType != RTM_DELNEIGH) && StructNdMsg.isNudStateConnected(nudState);
}
- boolean isValid() {
+ public boolean isValid() {
return (msgType != RTM_DELNEIGH) && StructNdMsg.isNudStateValid(nudState);
}