Make IpNeighborMonitor#NeighborEvent member as public immutable.

The members of NeighborEvent used to be package private, that allows
NetworkStack module can access members directly due to they are in
the same package. After de-duplicate the IpNeighborMonitor from
NetworkStack module and rely on the 'net-utils-device-common-ip' lib,
package private members are not accessible any more, change them to
public immutable.

Bug: 235901424
Test: m
Change-Id: I49f863055242de4f4f815ea01fe2a695b8359751
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);
         }