History log of /frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
acc8c09d3a12d00b565a76acc26061172c3dd3c6 13-Apr-2015 Erik Kline <ek@google.com> Add android.net.IpPrefix#contains()

This was originally to avoid RuntimeException in RouteInfo#matches():
When an IPv6 prefix with a length greater than the max permitted
for IPv4 is matched against an Inet4Address, the call to
NetworkUtils throws RuntimeException.

Change-Id: I92e2bd19a4e7d656cf682fd27678da07e211850d
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
1806b1fc25bcffaa005e72a55042031a42b168b1 11-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Switch RouteInfo to use IpPrefix instead of LinkAddress.

This addresses a TODO and also makes it possible to create
routes to destinations that are not valid LinkAddresses, such as
multicast addresses.

Bug: 16875580
Change-Id: Id4c77b00dc3064bf27d78cdcbbe035e645748cfe
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
64c43b1948a2b2fcd692cd4a48f031efbf7f7336 23-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Minor changes to RouteInfo.

1. Realize that mDestination can never be null and update the
code accordingly.
2. Simplify isDefaultRoute.
3. Provide two new hidden utility methods, isIPv4Default() and
isIPv6Default(), that can be used by LinkProperties to
to determine if the system has connectivity.
4. Update tests.

Bug: 9180552
Change-Id: I85028d50556c888261d250925962bdedfe08e0c6
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
8c6c2c3c929acad783b9a56b8d9efa597d0ae609 12-Jun-2014 Lorenzo Colitti <lorenzo@google.com> IpPrefix improvements.

1. Allow IpPrefixes to be created from strings. In order to do
this, factor out the code from LinkAddress which already does
this to a small utility class in NetworkUtils.
2. Truncate prefixes on creation, fixing a TODO.
3. Add a toString method.
4. Write a unit test.

While I'm at it, make RouteInfoTest pass again, and convert it
to use IpPrefix instead of LinkAddress.

Change-Id: I5f68f8af8f4aedb25afaee00e05369f01e82a70b
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
6f0ec45a3bff040790ae84345f154c65c9777610 12-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Fix Build

Change-Id: Iebbce8eaf21b3d2ba01ec720812d38018b13529e
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
130669992c5ea8d54db15f142e27578bdcf7e003 12-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Fix build breakage.

Change-Id: Ideb32704ce5dc37ef36b05609f88da2aa55b3a00
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
6307b35e1d3a8d577877be0b4c9cea1a909b6329 04-Jun-2014 Sreeram Ramachandran <sreeram@google.com> Add a new IpPrefix class and use it in RouteInfo.

This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.

Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.

Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e
(cherry picked from commit 7d3b4b9a3d4de9673119632da0ebd583e50126f7)
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
fdadc4e242d987c09007df274e01fe678a82331f 27-Mar-2013 Lorenzo Colitti <lorenzo@google.com> Make isHostRoute match only host routes

Currently, isHostRoute returns true iff the gateway address is
the unspecified address (0.0.0.0 or ::). Thus, it will return
true for any route that has no gateway (e.g., a route pointing at
a point-to-point interface), even if the route is not a host
route.

Fix this by checking the prefix length instead. This should be
safe because:

1. mDestination cannot be null, since it's created using new.
2. Host routes created using makeHostRoute (which is what
ConnectivityService calls) always have the correct prefix
lengths (/32 or /128) set.

Bug: 8276725
Change-Id: I14285398823fa6c312349128c7cc216cad4a84c9
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java
45b9a5bb93569ca49bbd44f7a518091371687f96 08-Mar-2013 Lorenzo Colitti <lorenzo@google.com> RouteInfo changes.

- Add the interface name.
- Fix a bug where a default route would match an address of
another protocol (e.g., 0.0.0.0/0 would match 2001::).
- Tweak the hashCode method.
- Write a unit test.

Change-Id: Ida8266de440a9b1d9eaa132f182b9f1ce8978c44
/frameworks/base/core/tests/coretests/src/android/net/RouteInfoTest.java