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
|