History log of /frameworks/base/core/tests/coretests/src/android/net/IpPrefixTest.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/IpPrefixTest.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/IpPrefixTest.java