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
This commit is contained in:
Lorenzo Colitti
2013-07-31 23:23:21 +09:00
parent 57dbb7d9e7
commit e1b4742442
3 changed files with 69 additions and 24 deletions

View File

@@ -2433,7 +2433,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
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();