Add accessors for all addresses and clarify compare* methods
1. Add a method to return all addresses and all LinkAddresses on
all links (both base links and stacked links). We already had
one for routes, but did not yet have any for addresses.
2. Rename compareRoutes to compareAllRoutes, because unlike the
other compare* methods, it looks at all interfaces. Update
what appears to be its only caller.
3. Update the documentation of the compare* methods to match
reality (they don't return lists) and clarify whether they
look at all links or only the base link.
Change-Id: Ie22e6c7f163d5de8e407248b45171dc28382d2d3
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 9615ff5..af9fdff 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -2433,7 +2433,7 @@
CompareResult<RouteInfo> routeDiff = new CompareResult<RouteInfo>();
if (curLp != null) {
// check for the delta between the current set and the new
- routeDiff = curLp.compareRoutes(newLp);
+ routeDiff = curLp.compareAllRoutes(newLp);
dnsDiff = curLp.compareDnses(newLp);
} else if (newLp != null) {
routeDiff.added = newLp.getAllRoutes();