Remove unnecessary checks

event.ip is of type InetAddress which is guaranteed to be an instance of either its
Inet4Address or Inet6Address subclass.
In addition, shouldIgnoreIncompleteNeighbor is called from handleNeighborLost(), which in turn
is called from NeighborEventConsumer which ignores all events for neighbors that are not in the
watchlist. So both checks are guaranteed to succeed and are therefore unnecessary.

Test: TH
Change-Id: I1a678ccda8f8c1beaf2509f3c8dabd395090db1f
diff --git a/src/android/net/ip/IpReachabilityMonitor.java b/src/android/net/ip/IpReachabilityMonitor.java
index 70a0957..58cd051 100644
--- a/src/android/net/ip/IpReachabilityMonitor.java
+++ b/src/android/net/ip/IpReachabilityMonitor.java
@@ -65,7 +65,6 @@
 import com.android.networkstack.metrics.IpReachabilityMonitorMetrics;
 
 import java.io.PrintWriter;
-import java.net.Inet4Address;
 import java.net.Inet6Address;
 import java.net.InetAddress;
 import java.util.ArrayList;
@@ -479,14 +478,6 @@
         // apply this logic.
         if (mIgnoreNeverReachableNeighbor) return false;
 
-        if (!(event.ip instanceof Inet6Address || event.ip instanceof Inet4Address)) {
-            Log.e(TAG, "Invalid IP address " + event.ip);
-            return false;
-        }
-
-        // If neighbor isn't in the watch list, return false.
-        if (!mNeighborWatchList.containsKey(event.ip)) return false;
-
         // For on-link IPv4/v6 DNS server or default router that never ever responds to
         // address resolution(e.g. ARP or NS), kernel will send RTM_NEWNEIGH with NUD_FAILED
         // to user space directly, and there is no netlink neighbor events related to this