History log of /frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b36a3131d1b05efa176f79d318197499b2c45380 26-Jun-2015 Erik Kline <ek@google.com> Fix use of reachable DNS server logic

Move reachable DNS server computation out of ConnectivityService
and split it into LinkProperties#isReachable() and a companion
change in WifiStateMachine's makeLinkProperties().

Restore previous ConnectivityService#updateDnses() behaviour, as
the pruning is done in WifiStateMachine now.

Bug: 19470192
Bug: 20733156
Bug: 22098233
Change-Id: I810ef74d504e5dc1ca2017d435cdadd6b82171e6
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
cd7ed16f00d243568e3b73b7fc7f0f94cfebe8ce 21-May-2015 Erik Kline <ek@google.com> LinkProperties function to compare provisioning and remove DNS servers

Adds:
- enum ProvisioningChange
- LinkProperties#compareProvisioning()
return a ProvisioningChange value describing the delta in
provisioning between two LinkProperties objects
- LinkProperties#removeDnsServer()
- make "@hide public" isIPv4Provisioned() and isIPv6Provisioned()

Bug: 18581716
Change-Id: I3df90b2b89617f693346f2dbe72e77c88ce91ffd
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
dd91fb44743f15ee308a4cfedeca6338b6912fdc 28-Oct-2014 Erik Kline <ek@google.com> Merge "(re)define the definition of "provisioned"" into lmp-mr1-dev
f3cab63ef2248aebf2c931cd1e84d5739791fa50 20-Oct-2014 Lorenzo Colitti <lorenzo@google.com> Change removeStackedLink to take an interface name.

This simplifies callers.

Also remove all "implementations" of addStackedLink and
removeStackedLink except the one in LinkProperties, because they
are unused.

Bug: 12111730
Change-Id: Ie294b855facba4b1436299dcb3211b72d9ba448e
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
d3b9fd33c69fa4fb844238c90b1fd343052946d9 24-Oct-2014 Erik Kline <ek@google.com> (re)define the definition of "provisioned"

Specifically:

[1] provide a hasIPv4(), and
[2] a hasIPv6()

each of which requires an IP address, a default route, and
address-family-specific DNS servers to evaluate to true.

Additionally:

[3] redefine isProvisioned() to return the logical OR
of [1] and [2] above.

Any external caller can still use any of the has*() methods to
construct its own, different definition of "provisioned".

Bug: 17769720
Change-Id: Ia692fb8508484ff403d3920c94d0e1db4563f807
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
76ea6c68d3222441970ef98079ba30710ac8c595 23-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Teach LinkProperties whether it's provisioned or not.

In IPv4, a link is provisioned when DHCP succeeds. In IPv6, a
there is no such signal, because addresses and DNS servers can
be notified by the kernel at different times.

Add an isProvisioned method that returns true if we believe that
enough information has configured to use a network. For IPv6,
this requires an IP address, default route, and DNS server. For
IPv4, this requires only an IPv4 address, because we support
static configuration that doesn't have a default route or DNS
server.

To do this we use the existing hasIPv4Address method, rename the
all-but unused hasIPv6Address method to hasGlobalIPv6Address
(which is what we want anyway) and add new hasIPv[46]DefaultRoute
and hasIPv[46]DnsServer methods.

Bug: 9180552
Change-Id: Ib2f5ff8af920f7b6f1edf0e2afaaa0edce9bc72d
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
1603eadc5ad2f6d3e912ca0f20ec1bbc0b81fe01 23-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Unbreak LinkPropertiesTest.

This was broken by the changes that made addRoute add routes
only if they did not already exist.

Change-Id: I1d227df9223fbecf106efde05b709f320824ee9d
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
df2b878ff4e7b4a258588d3a93574c399db78a07 06-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Fix public API of LinkProperties.

bug:15142362
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
34385d352da19805ae948215e2edbeedd16b7941 28-Apr-2014 Elliott Hughes <enh@google.com> Track libcore.os' move to android.system.

(This is partial, but should cover everything in AOSP master except
for the zygote.)

Change-Id: I1042c99245765746a744c44e714095cb2c6cb75d
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
64483947fdb03bf838e317ac0a4af5e0f53a5bbf 15-Nov-2013 Lorenzo Colitti <lorenzo@google.com> Add address flags and scope to LinkAddress.

This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.

1. Add flags and scope to the class and update the unit test.
Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
Since most callers don't know about flags and scope, provide
constructors that default the flags to zero and determine the
scope from the address. Addresses notified by the kernel will
have these properly set. Make multicast addresses invalid.
Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
address and prefix information between two LinkAddress
objects. This is necessary because an interface can't have
two addresses with the same address/prefix but different
flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
to identify existing addresses to add/remove using
isSameAddressAs instead of implicit equals(). Specifically:
- If addLinkAddress is called with an address that is already
present, the existing address's flags and scope are updated.
This allows, for example, an address on an interface to go
from preferred to deprecated when it expires, without it
having to be removed and re-added.
- If removeLinkAddress is called with an address that is
present but with different flags, it deletes that address
instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
notification methods to take just a LinkAddress instead of
LinkAddress, flags, and scope. While I'm at it, change the
order of the arguments for consistency with the other
functions in the interface.

Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
69df743f7489ca67ef1c94270325d1056f1bc546 07-Sep-2013 Robert Greenwalt <rgreenwalt@google.com> Fix the build.

Change-Id: Ia5d29de9db7ea8fd467b3bde551a8cfb95877b41
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
9d9b74a900696191048aa97cc3c854072640428b 01-Sep-2013 sy.yun <sy.yun@lge.com> Setting MTU size for specific network.

Able to config network specific MTU size. Normally, the default size of MTU is 1500.
US - ATT 1410, TMUS 1440, SPRINT 1422
KR - SKT 1440, KT 1450, LGU+ 1428
JP - KDDI 1420, SoftBank 1340
CA - RGS 1430, FIDO 1430, MTS 1430, BELL 1358, SaskTel 1358
AU - TEL 1400

Bug: 10195070
Change-Id: Ie18650b37a3d44af944f2dae4aa97c04fb12cd5e
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
22f407b11e11cfdb336e06e8c0d4a7ef1eafc783 23-Aug-2013 Lorenzo Colitti <lorenzo@google.com> Add a function to replace all the link addresses.

Bug: 10232006
Change-Id: I689ce4735999dac2ab5e1fae09d80b1f734292a1
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
4faa027df03c241c92a12a437f20767ab4d6ee64 08-Aug-2013 Lorenzo Colitti <lorenzo@google.com> Modify LinkProperties address update methods.

1. Make addLinkAddress a no-op if the address already exists.
2. Make addLinkAddress, addStackedLink and removeStackedLink
return a boolean indicating whether something changed.
3. Add a removeLinkAddress method (currently there is no way of
removing an address).
3. Move hasIPv6Address from ConnectivityService to
LinkProperties, where it belongs.

Bug: 9625448
Bug: 10232006
Change-Id: If641d0198432a7a505e358c059171f25bc9f13d5
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
3f1e1b2ce407684519f8bd070c931940fd33db4f 08-Aug-2013 Lorenzo Colitti <lorenzo@google.com> Simplify LinkPropertiesTest.

Instead of converting IP addresses to strings throughout the
test, do so once at the beginning.

Change-Id: I7f0dae5d2e9e2cdc6ec808e2cf71197ba6ade0a4
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
d1e0fae2bc5c98b1f00b185d7be7219dc7e1d0f7 31-Jul-2013 Lorenzo Colitti <lorenzo@google.com> 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
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
213f98b6fe81c73f0d182fb5af312d4ce4a08041 01-Apr-2013 Lorenzo Colitti <lorenzo@google.com> Fix LinkProperties's equals() method.

LinkProperties's equals() method was broken by the addition of
stacked interfaces. The reason was that equals() was checking
the equality of mStackedInterfaces.keys(), which is just an
enumeration, instead of mStackedInterfaces.keySet(), which
actually contains the keys. The test was failing, but I didn't
notice.

Fix the bug and make the test check the objects more in depth
so it can give more detailed error messages when equals() fails.

Bug: 8276725
Change-Id: Ie990bd75f641c28e63e54d953dcd0f4de13f7c9f
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
b91e50c266a7eb9dd6f8171deb497931ef7aef76 15-Mar-2013 Lorenzo Colitti <lorenzo@google.com> Fix build.

Change-Id: Iac84a5f35d7fcaebd096e605a4590f8c90fe97b0
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
419a4ce9e461177d75eca5fd71fc8c275969e479 07-Mar-2013 Lorenzo Colitti <lorenzo@google.com> Add stacked interfaces to LinkProperties.

Bug: 8276725
Change-Id: I2f592d4c690e9af0459ae742ab16107a10d89353
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
1994bc14ab9fd3a3c5dca8851cfc0042bcb25d46 09-Mar-2013 Lorenzo Colitti <lorenzo@google.com> Unit test routes with interfaces in LinkProperties

Change-Id: Ie41a56bc9863ee72f4d7a8f72e436fc57e57b1af
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
aa70f101e08098ed9cb190abe2d7f952561026b8 28-Apr-2011 Robert Greenwalt <rgreenwalt@google.com> Add RouteInfo objects for tracking routes.

Used to have list of gateways for default routes, but general static routes
should be supported.

Change-Id: I01730142c6139f2b833b9d48f5381d2d320b69f6
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java
4e900091c4da26eb1c9f0d232ee0e50f4522cc69 04-Apr-2011 John Wang <johnwang@google.com> Make LinkProperties comparable.

Add equals() and hashcode() to LinkProperties and related fields.

Bug:3501569
Change-Id: Ifa737a67c16867ac43cf76bf618a483e612a189e
/frameworks/base/core/tests/coretests/src/android/net/LinkPropertiesTest.java