History log of /frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
23cdacbec61c130fc35b1c9e84cb8f9b991fd092 04-Oct-2016 Erik Kline <ek@google.com> Refactor "avoid bad wifi" logic into a utility class
am: 065ab6ee40

Change-Id: I4a6ad3791ac551b0d64b37dd4e2afef1e8e8ee10
065ab6ee407dc8b3b5b477e483b6f48e50720113 02-Oct-2016 Erik Kline <ek@google.com> Refactor "avoid bad wifi" logic into a utility class

Additionally, add this utility class to IpManager for compatibility
verification. A follow-on CL will make use of IpManager's local
AvoidBadWifiTracker.

Bug: 31827713
Change-Id: If8c56c3f8076d6a5157ea180e361bbdadc2bc1dd
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
d953bf853d233026c9064e6a0c962b14cf4658d6 27-Sep-2016 Hugo Benichi <hugobenichi@google.com> Captive portal detection uses 3rd fallback probe

This patch adds the possitibility to send a 3rd fallback validation
probe in sendParallelHttpProbes when neither the 1st http probe nor the
https probe came back with a conclusive answer.

This 3rd probe is only used for trying again captive portal detection
and does not return success, so that network validation always fails if
the https probe fails.

In addition, the url reveals a captive portal is now sent to the
CaptivePortalLoginActivity so that all three probes can use different
urls.

Bug: 29367974

Change-Id: I7385fde1aa1316d94aac350af0e956cb193aa4ee
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
aab02df1957927797ba745e5a2b42df0722f076b 20-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Support "don't ask again" in the avoid bad wifi dialog.
am: 165c51c0eb

Change-Id: Ic6a1917a83e2d847bd673790e2c36f7316ca7acd
165c51c0eb9834a3d95ce0b31b07c7c8975a54d7 18-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Support "don't ask again" in the avoid bad wifi dialog.

This contains the following changes:

1. Make NETWORK_AVOID_BAD_WIFI a tristate: 0 means never avoid
bad wifi, unset means prompt the user, 1 means always avoid.
2. Look at NETWORK_AVOID_BAD_WIFI only if the carrier restricts
avoiding bad wifi (previously, we relied on the setting being
null and defaulting to the value of the config variable).
3. Add an avoidUnvalidated bit to NetworkAgentInfo to track
whether the user has requested switching away from this
unvalidated network even though avoiding bad wifi is generally
disabled. This is set to true when the user selects "switch"
in the dialog without setting the "Don't ask again" checkbox.
4. Add a hidden setAvoidUnvalidated API to ConnectivityManager to
set the avoidUnvalidated bit.
5. Additional unit test coverage.

Bug: 31075769
Change-Id: I1be60c3016c8095df3c4752330149ce638bd0ce1
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
40b707ed3910b130e499873bc20447c582548ec5 15-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Unit tests for avoid bad wifi networks setting.
am: 73b20938c7

Change-Id: I6491f1a93f93f222e23ef6e5e437631556637e44
73b20938c7b0a27c027204a7d4bdcf18766cb167 15-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Unit tests for avoid bad wifi networks setting.

Bug: 31075769
Change-Id: I21ba20df59ddce5731ef1ebe8846b3f00578a674
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
e14d49ad5962330a112d46b12d456ecd6bc593b5 20-Jul-2016 Lorenzo Colitti <lorenzo@google.com> Add test coverage for background networks.

Bug: 23113288
Change-Id: Idad62f5f025825f99007ccf7b20f530dc3cf6daa
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
f9fdf87af2fe0cb9b70ffa81a0912448f4ef4207 28-Jul-2016 Hugo Benichi <hugobenichi@google.com> IpConnectivityMetrics: no metrics upload in tests

Similarly to ApfTest, this patch changes ConnectivityServiceTest to use
a mock object instead of IpConnectivityLog so that running
ConnectivityServiceTest does not generate android.net.metrics events.

Bug: 30450301
Change-Id: Ibc0479f381f26e60baefbae15407c62aecbf6666
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
acdd639513858629f804316e9dd4105634504a90 07-Jul-2016 Erik Kline <ek@google.com> Support requesting async LinkProperties/NetworkCapabilities updates

Bug: 9580643
Change-Id: I1d7ba7645c20d7d53f6eef777dfce43727940f13
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
b57578ca4f0fa64406ffad09ad9250391e3bbfa5 30-Jun-2016 Lorenzo Colitti <lorenzo@google.com> Rewrite lingering.

The two major changes here are:

- Move lingering out of NetworkMonitor. The fact that lingering
is currently its own state in NetworkMonitor complicates the
logic there: while a network is lingering it cannot be in any
other state, we have to take care not to leave LingeringState
for the wrong reason, etc.
- Instead of keeping a single per-network boolean to indicate
whether a network is lingered or not, keep a linger timer for
every request. This allows us to fix various corner-case bugs
in lingering.

The changes in behaviour compared to the current code can be seen
in the unit test changes. Specifically:

1. Bug fix: when a network is lingered, and a request is added
and removed to it, the existing code tears the network down
immediately. The new code just sends another CALLBACK_LOSING
and resumes lingering with the original timeout.
2. Bug fix: if cell is unvalidated and wifi comes up and
validates before cell does (as might happen on boot), the
existing code immediately tears down cell. The new code
lingers cell, which is correct because unvalidated cell was
the default network, so an app might have been using it.
3. Correctness improvement: always send CALLBACK_AVAILABLE for
the new network before sending CALLBACK_LOSING. This was not
really an issue in practice, because the usual flow is:
- Network A is the default.
- Network B connects, CALLBACK_AVAILABLE.
- Network B validates, CALLBACK_LOSING.

Bug: 23113288
Change-Id: I2f1e779ff6eb869e62921a95aa9d356f380cf30a
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
09e202103d160efcb721e3b1ed699416e2b3a5bb 04-Jul-2016 Lorenzo Colitti <lorenzo@google.com> Add test coverage for a bug in the lingering code.

Bug: 23113288
Change-Id: I573ee5908b9d973931234eb7d2db8ea0aaa4b31e
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
7369d8d1b6a5118d9b20d72931e22c645945f3bc 28-Jun-2016 Lorenzo Colitti <lorenzo@google.com> Add detailed test coverage for lingering.

Bug: 23113288
Change-Id: I65784f3589378d97f3c824e600f21f361be8741e
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
6ee0a92ca04f89081094842487a279cc47e8b5ad 27-Jun-2016 Lorenzo Colitti <lorenzo@google.com> Add more test coverage for requests and callbacks.

1. Support multiple callbacks in TestNetworkCallback. This is
necessary to test situations where multiple callbacks are
generated by the same event (e.g., CALLBACK_LOSING on cell
with CALLBACK_AVAILABLE on wifi when wifi connects), which is
necessary to test callback order. So far this has not been
covered because all callback testing was using per-network
callbacks.
2. Add a benchmark test for registering NetworkRequests and for
sending onAvailable and onLosing callbacks.

Bug: 23113288
Change-Id: Ib69373358ad766ab1bd989e864a5a51ef762c73c
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
9acda9c82577972b8291853978650c24c20e950c 05-Jun-2016 Lorenzo Colitti <lorenzo@google.com> Don't treat the lingerExpired broadcast specially.

NetworkMonitor no longer uses the broadcast for lingering, it
uses WakeupMessage instead.

Bug: 23113288
Change-Id: Idb0c55fc68cb8f45b3213c7134213904f227852e
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
762ea7aab7636b33daeee2c4ba169f163c61347f 05-Jun-2016 Lorenzo Colitti <lorenzo@google.com> Add a test for mobile data always on.

Bug: 23113288
Change-Id: Ia8649061a797367d135bb5576600a7cdc85a822e
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
6d553f6dfdcc188fa6b17d4abb11d6222009a8fb 04-Jun-2016 Lorenzo Colitti <lorenzo@google.com> Add a FakeSettingsProvider and use it in ConnectivityServiceTest.

This class makes it easier to test code that uses Settings:

1. Real device or emulator settings don't affect the code under
test; all settings always start off empty.
2. It's possible to change settings from the test without
affecting system settings.
3. No changes are needed to the code under test. The changes to
the tests are simple: just add a fake ContentResolver to
whatever mock Context is already used by the test, and make
that ContentResolver use the fake provider.

Bug: 23113288
Change-Id: I5e7e5a87571444ae49ccf551705620675a36cd17
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
4e1d3fdf7a43b3e43efac0a26ca3d0f458ce87d3 08-Apr-2016 Paul Jensen <pauljensen@google.com> Cap number of NetworkRequests a UID can make to 100

This prevents DoSing ConnectivityService with too many requests.

Fixes: 27253080
Change-Id: Id0480d220b2f01b9ef1146bef8ead2fc8287e28d
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
2324373124f0ba4e59ba6d3de9e274f2fa28cff0 06-Apr-2016 Paul Jensen <pauljensen@google.com> If Internet probe is redirected, pass redirect destination to NetworkAgent.

Transport may use the redirect to make additional determination about network
state.

Bug: 25203607
Change-Id: I07d8918f13fdcbe0b6fd757536bfc1850a2a244f
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
d2baf792f8b7ae46aa6a35cff25eb7e3923f5125 24-Mar-2016 Robin Lee <rgl@google.com> Internal API for system apps to determine default network for other apps

Callers with CONNECTIVITY_INTERNAL permission can read off the netId
that an application is assigned to by default.

Necessary for making connections as the default network for a client
app eg. when downloading stuff on its behalf.

Bug: 27074270
Change-Id: I8d35e8e99126875f55f3c545090326f3e9be43fb
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
a2d29407d02ba692a90507db8b6fc2cf5cf89725 16-Mar-2016 Erik Kline <ek@google.com> Support registering a request for the default network

Change-Id: I079f5be97b585cf5692dd4c7a144b993d168a9a5
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
5eaaf747b4be27a8ef9d7fb5a2531543db490b89 02-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Fix IdleableHandlerThread.

Occasionally, ConnectivityServiceTest fails with "BUG: only one
idle handler allowed". I have not been able to reproduce this
consistently, but code inspection reveals an unsafe access to
mIdleHandler inside queueIdle. Wrap that in a synchronized block.

Change-Id: I27307e2e55fa8d937d7f043bd436894091c3c667
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
bfecba2938bd01299c74bc7d7cf0191c1908776a 20-Feb-2016 Lorenzo Colitti <lorenzo@google.com> Speed up ConnectivityServiceTest.

1. Override WakeupMessage with an implementation that uses
sendEmptyMessageDelayed. This allows us to replace a
6-second sleep with a 150ms wait.
2. Change waitFor()'s polling interval from 100ms to 50ms.

With these changes ConnectivityServiceTest goes from ~9s to ~3s.

Change-Id: Id78aab9cded90a5b17f09d7f437904e179808dd2
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
531a34430072b9296aaeb47d9e7d04326a93fee4 29-Feb-2016 Lorenzo Colitti <lorenzo@google.com> Move PinningNetworkCallback out to a new NetworkPinner class.

Also add tests.

Bug: 19159232
Change-Id: Ic366b53259ee5944a8e864876425a6558c0a7216
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
e496c555b94086020b0ec155f6a87f6645c6cd93 28-Jan-2016 Etan Cohen <etancohen@google.com> Merge "Allow NetworkFactories to match any network specifier on a request" into mm-wireless-dev
am: bd0858ba67

* commit 'bd0858ba679cced35bda55a643707ad69e4caa34':
Allow NetworkFactories to match any network specifier on a request
b7c2487c8b5fbd154643b8ddade8d88507cae137 04-Jan-2016 Udam Saini <udam@google.com> Makes captive portal server calculation in one place.

This also creates a hidden api for the captive portal server calculation
so that the Setup Wizard can use this as well.

bug:13246857
Change-Id: I4dfd0916df97cfce13252c7cc15f7bd05ed95f77
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
ddb9ef0357e3ee609e188fb9e1e461f95aa601fa 18-Nov-2015 Etan Cohen <etancohen@google.com> Allow NetworkFactories to match any network specifier on a request

Current usage of NetworkSpecifier: network factory will match a request
if the request has either a (1) empty network specifier, or (2) a
network specifier which is identical to that of the network factory.
Note: 'matching' w.r.t. network specifier - all other matching rules
are still in effect.

Change: add rule (3) or the network specifier of the network factory
is the special string (which is defined as "*" and which user-facing
network requests aren't allowed to use).

Rationale: allows on-demand network creation.

Example:
- Can specify a Wi-Fi NetworkRequest with NetworkSpecifier="ssid"
- It will match a Wi-Fi network factory specifying NetworkSpecifier="*"
- That network factory will bring up a Wi-Fi network, connecting to the
specified SSID.
- Once the network is created it will create a NetworkAgent which will
now have a NetworkSpecifier matching that of the request (not the
match-all special string!)

That final step of making sure that the NetworkAgent matches the request
and not the match-all is critical to delivering any subsequent callbacks
correctly. I.e. your network will only get callbacks which match it.

Bug: 26192833
Change-Id: I49e3b492e0bb48a3f6e9a34e3f94f0e1cf89741f
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
2c1a253f2297bf9682105924aee828a0c5897027 27-Nov-2015 Lorenzo Colitti <lorenzo@google.com> Fix one of the breakages of ConnectivityServiceTest in master.

Change-Id: I31c7a019383fa589beb1572486700e54edfb97e8
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
7914ce5dd4d2e53eba1a3a8a1ed97da96cec129f 08-Sep-2015 Lorenzo Colitti <lorenzo@google.com> Add tests for the PacketKeepalive API.

This currently fails in many different ways, but it tells us what
to fix.

Bug: 22606153
Bug: 23884210
Change-Id: If2e5ee0a8d7b26cad67d3d566ed5b1383e0db096
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
ffa390b6f37f20ab5f4ebf5c861c565db200107e 07-Aug-2015 Lorenzo Colitti <lorenzo@google.com> Use a CountDownLatch instead of sleep() in NetworkFactory tests.

This makes testNetworkFactoryRequests 2-3 times faster.

Bug: 22606153
Change-Id: I9657b6929e77f23ec811d0ab57b2ba974f0b6a69
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
e58961aa5f86553f0106edbc03d1534b097fa25c 07-Aug-2015 Lorenzo Colitti <lorenzo@google.com> Get rid of shortSleep() in ConnectivityServiceTest.

Instead, use IdleHandler to wait for things to become idle.

Bug: 22606153
Change-Id: Ic6ab93ad4d336b40962f9be1096629a44b63ee2f
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
83fa2588f662aae0b612da91fd09d205cf2e8cb0 06-Aug-2015 Lorenzo Colitti <lorenzo@google.com> Make ConnectivityServiceTest a bit more readable.

1. Make TestNetworkCallback a bit smarter and rename it to
SingleUseNetworkCallback. This allows us to get rid of all the
calls to TestNetworkCallback#getConditionVariable.
2. Delete the commented out code that used to test a
ConnectivityService model that has not been used since KK.
3. Remove unused imports, etc.

Bug: 22606153
Change-Id: I81a2d0b970d19e5f4515490d8c2f88d416445fa1
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
aae613d96134245af7c55976731a49fa59e77470 19-Aug-2015 Paul Jensen <pauljensen@google.com> Don't mark NetworkRequests restricted when they don't have restricted caps

Requests without NET_CAPABILITIES_INTERNET and just the default network
capabilities should not be marked restricted. Without this fix apps
can hit permissions exceptions if they inadvertently make requests
without NET_CAPABILITIES_INTERNET.

Bug:23164917
Change-Id: I4c7136821315bcb05dfc42ffbc505a5d4f6109e6
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
dbc4edccfced5cb739bae75e8cd15cecc39cf16e 05-Aug-2015 Paul Jensen <pauljensen@google.com> Merge "Fix NOT_RESTRICTED network capability and enforce it." into mnc-dev
487ffe7d3d84bf65212158f7098e8a84b5b55e09 24-Jul-2015 Paul Jensen <pauljensen@google.com> Fix NOT_RESTRICTED network capability and enforce it.

With this change:
1. NOT_RESTRICTED should be removed from NetworkRequests that bring up
special restricted carrier networks (e.g. IMS, FOTA).
2. NetworkRequests without NOT_RESTRICTED require CONNECTIVITY_INTERNAL
permission to register
3. Binding sockets to networks without NOT_RESTRICTED requires
CONNECTIVITY_INTERNAL permission

Bug:21637535
Change-Id: I5991d39facaa6b690e969fe15dcbeec52e918321
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
ffc42b0b7be29ee4118e0515d5ab024927bcb8ca 29-Jul-2015 Lorenzo Colitti <lorenzo@google.com> Stop supporting legacy ConnectivityManager routing methods in M.

The methods startUsingNetworkFeature, stopUsingNetworkFeature and
requestRouteToHost were @removed in all the M preview builds, but
internal and external developers have noted that this imposes
additional burden for applications that need to work across
multiple platform versions because it causes compile-time errors.

We switched from @removed back to @deprecated to avoid these
problems. In order to effectively deprecate these methods, which
are error-prone and insecure, make them throw
UnsupportedOperationException if the app's target SDK is M or
above.

Because there are still one or two places in system code that use
these APIs, exempt Process.SYSTEM_UID and the OMA-DM client from
the check for now.

Bug: 22728205
Change-Id: I790bd32f3aa8067cbb625962a209bb9232f4b58c
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
cf4c2c637268b1a2979e20a8b5644916777a02a4 01-Jul-2015 Paul Jensen <pauljensen@google.com> Fix missing onLost NetworkCallbacks when network loses capability

If a network no longer satisfies a NetworkRequest, send the onLost
NetworkCallback. If it was a real request (not listen) then update
the NetworkFactories.

To test this change I created a little infrastructure to fake
different Internet connectivity probe results during tests. This
allowed me to rewrite some of ConnectivityServiceTest's logic for
validating networks. This brought to light a couple issues that
I had to address to keep tests passing:
1. testUnlingeringDoesNotValidate was relying on a bad side-effect
of my old method of ConnectivityServiceTest's logic for
validating networks, so I rewrote the test.
2. ConnectivityService was not sending out NetworkCallbacks for
WiFi when Cellular was validated. I'm including a fix for this
in this CL also.

Bug:22220234
Change-Id: I29314f38189817f8b2561a213c4f9e8522696663
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
e098854c41a72b22f4174bc623e8e93cde8d7331 25-Jun-2015 Paul Jensen <pauljensen@google.com> Fallback to Cellular if WiFi fails to validate

Previously, once a network validated, for the purposes of comparing networks
to select the default network, we always considered it validated.
With this change if a network later fails to validate, we'll take this latest
validation result into account. This means if WiFi and cellular are up
(e.g. if we recently switched from cellular->WiFi, and cellular is now
lingering) and both are validated, but for some reason WiFi fails a validation,
cellular will become the default network connection.

Bug:20896761
Change-Id: I858aa10c1aaec5cd9032067f960963409107bdb1
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
85cf78edc92b85ec90e91de42b14b84e202260f3 25-Jun-2015 Paul Jensen <pauljensen@google.com> Prepare some ConnectivityService logic for fallback to Cellular change

Reduce the duplication of some logic so when falling back to Cellular
when WiFi fails to validate is enabled, there's less chance for bugs
and failures:
1. De-duplicate several Network vs NetworkRequest matching functions
2. Remove the very tricky nascent logic by adding a simple "lingering" bit.

Bug:20896761
Change-Id: I21da9e827eec9cfd6835fcaa650192b9186ed053
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
bb2e0e98160f099261876794518d4db62e309aec 16-Jun-2015 Paul Jensen <pauljensen@google.com> Disallow requesting networks with mutable NetworkCapabilities.

It's not clear what it means to request a network with a mutable
NetworkCapability like NET_CAPABILITY_VALIDATED or
NET_CAPABILITY_CAPTIVE_PORTAL. Presently requesting such a network
would fail in a number of different ways:
1. The NetworkFactories would fail to match the request against their
filter which doesn't include stateful NetworkCapabilities.
2. If the NetworkFactories did match, they'd bring up networks to try
and satisfy the requests, but the networks would not have any
mutable NetworkCapabilities initially so they'd be reaped.
Because of these problems it's safest to simply disallow these
requests.

Bug: 21343774
Change-Id: I56303242b81d39b370b8d5d1e32059bfcfc25949
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
3d911469a190437fe936103e861bfa171841fbd6 12-Jun-2015 Paul Jensen <pauljensen@google.com> Don't send spurious onAvailable NetworkCallbacks when rematching

Bug:21762680
Change-Id: Ia701045dffc666fe75fba0e1771872147e37179a
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
0a2823e539abeb037d3acb01b5d5eed7c85f4ed7 12-Jun-2015 Paul Jensen <pauljensen@google.com> Remove most sleep() calls from ConnectivityServiceTest

Change-Id: I90d2f6811ed1cb84614101200ac377e920bd864a
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
3cbad5c17f8f8312f5e87e528f6094b60fddc440 11-Jun-2015 Robert Greenwalt <rgreenwalt@google.com> Merge "Remove network requests properly." into mnc-dev
348e98dba046a33c4ba6069ef7a6ac18c2040fe2 06-Jun-2015 Robert Greenwalt <rgreenwalt@google.com> Remove network requests properly.

We used to only remove requests that we'd acted on but that's
just wrong.

Also adds test case which exposed the problem but passes with the fix.

bug:20731384
Change-Id: I581a005560cc71167b857abf2452769399a9e1b7
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
67b0b0756b47c0ef0c50ce42f140d36c200f7984 10-Jun-2015 Paul Jensen <pauljensen@google.com> Avoid overlapping NetIDs in ConnectivityServiceTest with real NetIDs

Overlapping the NetIDs can cause the ConnectivityService instance under test
to inadvertently use real networks, for example when NetworkMonitor attempts
to validate a network. This fixes test hangs when run on devices with
active internet connections.

Change-Id: I5e1898953f0117b9f75beccac4a52ae2db173567
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
d7b6ca91e9ecac15949a4484d560cfab5833a431 13-May-2015 Paul Jensen <pauljensen@google.com> Revive ConnectivityServiceTest and add some tests.

Change-Id: I44740a7b21cff18ac2a67d09c4d0e597add19ee0
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
f851d6dd2a15b74f63c85403afad0ed747f7311c 20-Apr-2015 Erik Kline <ek@google.com> CONNECTIVITY_ACTION is the new _IMMEDIATE

Bug: 20013379
Change-Id: I3e904dc0a0ddb30c7bb8cdb24d0762052ddc59eb
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
7fad4eb4b52bc6c7ddad47f70e0c310093fbde3b 21-Nov-2014 Paul Jensen <pauljensen@google.com> Remove dead code, mostly DataStateTracker.

Change-Id: I1433937bffdb29bd42fb1adbfcf0a50ceffac7dd
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
6831f1d80f9a5ad2400bd186fb6179e0e511be05 27-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Remove dead code 2.

Removing ConnectivityService.NetworkFactory. This requires disabling
the ConnectivityServiceTest, but that's been broken since we stopped
using NetworkStateTrackers anyway.

Change-Id: I9b86bd37eb9d018c40f60dca5b00d62c36d4e3ad
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
03666c705ddabe0e7c5869ab69c2ca8b964164e9 20-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Cleanup: Delete dead code.

Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
4ddebf7f5b85d082c56f6a8aad11bd0c5ca68fde 16-Apr-2014 Sreeram Ramachandran <sreeram@google.com> Fix build.

Change-Id: I5dab09d2d8a9cff56fa17bb4e8c14b365449399b
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
a7b9796345335e4906d98432a1d194fa242cd23e 15-Apr-2014 Paul Jensen <pauljensen@google.com> Get ConnectivityServiceTest building again after 8f80cc8.

Change-Id: I4520011ba2076d8fac1ca234cb9a79c774992671
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
e16713597661c326d2bb6586a8b13e27520c4227 08-Mar-2013 Lorenzo Colitti <lorenzo@google.com> Always specify an interface for host routes.

Change-Id: I05b4d87e7d7e8237c6f4a70f1fedae00f416f581
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
3671b1e910e4d297bebcd3ceaa2682bfb4b1f4a1 01-Feb-2013 Jeff Sharkey <jsharkey@android.com> Migrate to using Mockito directly.

Change-Id: I1fcc5d1a780f5831bd6685f0735d4c0c6d245735
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java
fb878b66b9456f8fee2bcb1076263852d207949d 27-Jul-2012 Jeff Sharkey <jsharkey@android.com> Isolate NetworkStateTracker creation, test.

Change ConnectivityService to use a factory when creating
NetworkStateTrackers, which gives us a good place to inject mocks
for testing. Add initial tests to verify that network routes are
added and removed as networks changed.

Change-Id: I11cbc61a84c2ed4afa2670036295b1494eab26e1
/frameworks/base/services/tests/servicestests/src/com/android/server/ConnectivityServiceTest.java