Commit Graph

3558 Commits

Author SHA1 Message Date
Jeff Sharkey
40d13eec00 Merge "Last-ditch clamping of negative NetworkStats." into pi-dev am: 44eae19b24
am: 08211d9479

Change-Id: I572ef538dafb59d8947958df8eac155e890d08f0
2018-05-23 17:43:05 -07:00
Remi NGUYEN VAN
7bea387500 Merge "Add configurable captive portal probes" into pi-dev am: 1f8f21af60
am: 23d3487caa

Change-Id: Ia958815325d1466345e9626efc8f62fc9d08d774
2018-05-23 17:15:44 -07:00
Jeff Sharkey
08211d9479 Merge "Last-ditch clamping of negative NetworkStats." into pi-dev
am: 44eae19b24

Change-Id: I0db4e16533aeac3aa88307a0af0b64cb6041d2c0
2018-05-23 16:20:22 -07:00
Remi NGUYEN VAN
23d3487caa Merge "Add configurable captive portal probes" into pi-dev
am: 1f8f21af60

Change-Id: Iec7a74bbf2569a91e958c497200d77e8451cbf7b
2018-05-23 15:22:24 -07:00
Erik Kline
65417d4039 Merge "Fixup SntpClient to bypass Private DNS" into pi-dev am: 18474fcfaf
am: d49e0cf972

Change-Id: I327b816a9f472e94328232157a3b8887d17b0baf
2018-05-23 14:07:09 -07:00
Erik Kline
d49e0cf972 Merge "Fixup SntpClient to bypass Private DNS" into pi-dev
am: 18474fcfaf

Change-Id: I4655e3ce5691098c73bf070b8a9e4759485bb17a
2018-05-23 12:41:09 -07:00
Jeff Sharkey
44eae19b24 Merge "Last-ditch clamping of negative NetworkStats." into pi-dev 2018-05-23 16:30:25 +00:00
Remi NGUYEN VAN
1f8f21af60 Merge "Add configurable captive portal probes" into pi-dev 2018-05-23 14:26:39 +00:00
Remi NGUYEN VAN
8255c2d6c2 Add configurable captive portal probes
The probes allow testing for a configurable status code and location
header (regexes). They are disabled by default, so this CL is a
no-op unless the probe configurations are pushed.

Bug: b/79499239
Test: tests in CL pass, manual: captive portal login works
Change-Id: I785723aaed06054b9aa8ebff77803f23d7836db9
2018-05-23 20:48:46 +09:00
Erik Kline
7eccfeb9ca Fixup SntpClient to bypass Private DNS
NTP may be necessary in order to validate Private DNS certificates,
so it should be allowed to bypass Private DNS.

Test: as follows
    - built, flashed, booted
    - tcpdump for port 53; adb shell am restart
      queries for the NTP hostname appear in the clear
    - runtest frameworks-net passes
Bug: 64133961
Bug: 80118648
Change-Id: Id9ceb3fcaaffb48cbbd4cd381d48cae991572c9e
2018-05-23 16:03:03 +09:00
Jeff Sharkey
b5a97e6f63 Last-ditch clamping of negative NetworkStats.
We've seen reports of negative values flowing through to attempt
being recorded, which will outright crash.  This change does one
last-ditch check to see if we're about to work with negative values,
reporting any trouble and clamping them to zero so we don't crash.

This gives us the data we need to continue investigating without
triggering runtime restarts in the field.

Bug: 80057433
Test: atest android.net.NetworkStatsTest
Change-Id: I8174391c6cf5dadc2c2c10a8d841ee07e1f7d934
2018-05-22 11:35:32 -06:00
Remi NGUYEN VAN
b5c3b2be8a Merge "Move CaptivePortalProbeResult to its own file" into pi-dev am: fd12af848a
am: adfb78afdc

Change-Id: I5df7ee9f16bc6be4f02353d40a843a383dd4cbd9
2018-05-22 01:14:13 -07:00
Chalard Jean
c93ed402b0 Merge "Fix setCapabilities." into pi-dev am: d1d4cc94ba
am: c60a252b87

Change-Id: Ia5bebf8a233775367bbf1b788870528934ecbcfb
2018-05-22 01:09:11 -07:00
Remi NGUYEN VAN
adfb78afdc Merge "Move CaptivePortalProbeResult to its own file" into pi-dev
am: fd12af848a

Change-Id: Ia48b32307a51a66f2672d7112f71166dd6db41b1
2018-05-22 01:09:08 -07:00
Chalard Jean
c60a252b87 Merge "Fix setCapabilities." into pi-dev
am: d1d4cc94ba

Change-Id: I13d7782a6c0c7b1f94137995bbb0d257a58d89c1
2018-05-22 01:01:39 -07:00
Remi NGUYEN VAN
fd12af848a Merge "Move CaptivePortalProbeResult to its own file" into pi-dev 2018-05-22 08:00:56 +00:00
Chalard Jean
d1d4cc94ba Merge "Fix setCapabilities." into pi-dev 2018-05-22 07:51:09 +00:00
Remi NGUYEN VAN
d63c119101 Move CaptivePortalProbeResult to its own file
This is necessary to resolve visibility issues for the next change.

Bug: b/79499239
Test: runtest frameworks-net
Change-Id: I50bc96afe6ae88c8f58a693f0a4e821f1f9b3299
2018-05-22 10:00:28 +09:00
Chalard Jean
4c4bc93b5e Fix setCapabilities.
P introduced setSSID, UIDs and unwanted capabilities.
None of these exhibit commutative behavior through combineCapabilities
because their semantics don't allow it. Therefore
NetworkRequest.setCapabilities() is badly broken around any of
these. Look at the comments in the new tests to realize the
extent of the damage.

Bug: 79748782
Test: new tests written, old tests pass
Change-Id: Ie46581bdaf9ecc2f14aab44788bbdb27a3fec8c1
2018-05-21 14:46:40 +09:00
Erik Kline
bdc41e2dd2 Merge "Add explicit override for default Private DNS mode" into pi-dev am: 2b3c858296
am: 413d00c1c0

Change-Id: Ifbb9922c4226c5a8a7ef9422dc4bd0e5b83a56b9
2018-05-18 01:16:38 -07:00
Erik Kline
413d00c1c0 Merge "Add explicit override for default Private DNS mode" into pi-dev
am: 2b3c858296

Change-Id: If480ab40c7cf9ab75c52feafc28338a049cbceef
2018-05-18 01:08:26 -07:00
Erik Kline
1984179409 Add explicit override for default Private DNS mode
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 79719289
Change-Id: I943c5476666e47d04690626e2133f501cb875b46
2018-05-17 17:41:12 +09:00
Jeff Sharkey
ca46c6beea Merge "Let tests enumerate all transports/capabilities." into pi-dev am: 8e6445a1a5
am: 75299cffec

Change-Id: If07e77c92046807235229a4f67ee087bdd7bccf1
2018-05-15 08:37:39 -07:00
Jeff Sharkey
75299cffec Merge "Let tests enumerate all transports/capabilities." into pi-dev
am: 8e6445a1a5

Change-Id: Ie5cd22cfa2b6a60510fd1e31d7ebcd8f6cc890a0
2018-05-15 08:27:40 -07:00
Jeff Sharkey
a5ee62f356 Let tests enumerate all transports/capabilities.
This gives them a way to collect all included values without
resorting to manual probing of each newly added value.

Bug: 16207332
Test: atest com.android.cts.net.HostsideVpnTests
Change-Id: I35ca412512dc8515b44d5518e1ca4caa5bdc678f
2018-05-14 17:17:33 -06:00
Remi NGUYEN VAN
205fbfd220 Merge "Fix android.net.SSLTest" am: ef43ea3238 am: 60b828ca86
am: f0e3b091f8

Change-Id: I3cec265b459df9f956fd2f5d56f9b7ff18dca53b
2018-05-09 19:41:07 -07:00
Remi NGUYEN VAN
f0e3b091f8 Merge "Fix android.net.SSLTest" am: ef43ea3238
am: 60b828ca86

Change-Id: I482bd9734f62ba1554e0d7e0bf889b23450303ee
2018-05-09 19:31:38 -07:00
Remi NGUYEN VAN
60b828ca86 Merge "Fix android.net.SSLTest"
am: ef43ea3238

Change-Id: If877193c05bf6b932aceacc93b27241e619a21b2
2018-05-09 18:35:47 -07:00
Remi NGUYEN VAN
81774d1fa5 Fix android.net.SSLTest
The test is failing because of lack of visibility (IllegalAccessError).
Also rename it to match the tested class, migrate to JUnit4, and remove
an old test that is unused (suppressed), relies on third-party servers
and is not a proper unit test (would try to make real network requests).

Test: test now passes
Change-Id: I5032a056df83d4f572d89860b52bd85a1993d9dc
2018-05-08 15:31:58 +09:00
android-build-prod (mdb)
5b68325591 Merge "Add the list of private DNS addresses to LinkProperties"
am: 1100e84175

Change-Id: I76ec108862edfb557496ddcd8b5c73202cd674de
2018-04-27 00:56:10 -07:00
Chalard Jean
03dbf6bd5e Add the list of private DNS addresses to LinkProperties
(clean cherry-pick from ag/3874803)

Test: atest android.net.LinkPropertiesTest, also new tests pass
Bug: 73641539
Change-Id: If33a35b1354a67db09411ff098f20064797296ad
Merged-In: I4b739c56e658690532ae9deb0b9a3bc9b2adf8b0
Merged-In: I6bdbef78d078d68534c8e07e9af031ce374560ef
2018-04-27 13:32:10 +09:00
Nathan Harold
37baab43f7 Merge "Rework Exception Handling for IpSecManager" into pi-dev am: 16c671dc9a
am: 23d8eed9de

Change-Id: Ic1f560070d12f3bdeb5c07316aad7ebed9719f6f
2018-04-25 12:01:34 -07:00
Nathan Harold
23d8eed9de Merge "Rework Exception Handling for IpSecManager" into pi-dev
am: 16c671dc9a

Change-Id: I9c1acdc79053c70a8484935f61a537379b9be927
2018-04-25 11:51:00 -07:00
Nathan Harold
16c671dc9a Merge "Rework Exception Handling for IpSecManager" into pi-dev 2018-04-25 18:34:10 +00:00
Nathan Harold
ddeb90aa9d Rework Exception Handling for IpSecManager
In order to properly support EOPNOTSUPP this CL
applies a consistent approach to handling Exceptions.
Hereafter, all exceptions that aren't of a special
method-specific type (such as SpiUnavailableException)
will all be returned to the calling process unchanged.
At the API call site, the ServiceSpecificException,
which is really an Errno, will be inspected and either
converted to an unchecked exception for types we know,
or it will be converted to an IOException in cases where
that method can return a checked exception. In cases
where we do not expect an errno, we will simply throw
a generic RuntimeException. This means all API calls
will now properly throw UnsupportedOperationException
and may be CTS tested accordingly.

Bug: 72420898
Test: runtest frameworks-net
Change-Id: I4a00e221618896223fcdb4b4279fb14cd14e34d8
2018-04-24 19:04:08 -07:00
Lorenzo Colitti
4d121ff87f Merge "Actually @hide unwanted capability methods." into pi-dev am: a09c06a6c1
am: dc86aaa112

Change-Id: I923e5377a1abe761217612452cbfdba752e53de2
2018-04-24 14:50:14 -07:00
Lorenzo Colitti
dc86aaa112 Merge "Actually @hide unwanted capability methods." into pi-dev
am: a09c06a6c1

Change-Id: I80a88123b16c54734306da7e5dc0670972041648
2018-04-24 14:43:06 -07:00
Lorenzo Colitti
a09c06a6c1 Merge "Actually @hide unwanted capability methods." into pi-dev 2018-04-24 21:20:25 +00:00
Lorenzo Colitti
19c0ccaa8c Actually @hide unwanted capability methods.
Bug: 77601789
Test: builds, boots
Test: make doc-comment-check-docs
Change-Id: I7a913b83ab5110047d187564b3a1b0bbe1631942
2018-04-24 13:12:56 +09:00
Chalard Jean
1df73dd267 Merge "Add the list of private DNS addresses to LinkProperties" into pi-dev am: f12a2130a4
am: 1bb54ae872

Change-Id: I6bdbef78d078d68534c8e07e9af031ce374560ef
2018-04-20 04:59:52 -07:00
Chalard Jean
1bb54ae872 Merge "Add the list of private DNS addresses to LinkProperties" into pi-dev
am: f12a2130a4

Change-Id: I4b739c56e658690532ae9deb0b9a3bc9b2adf8b0
2018-04-20 04:49:43 -07:00
Chalard Jean
9419b11458 Add the list of private DNS addresses to LinkProperties
Test: atest android.net.LinkPropertiesTest, also new tests pass
Bug: 73641539
Change-Id: If33a35b1354a67db09411ff098f20064797296ad
2018-04-20 16:48:43 +09:00
Jeff Sharkey
5ee9434e9c Merge "Return "null" cycles for deprecated callers." into pi-dev am: 9eb0a655cc
am: fcbbe0f9c7

Change-Id: Ie4d4431a56dc4b7062d547b9e6b7828c13a64cb5
2018-04-14 19:03:49 -07:00
Jeff Sharkey
fcbbe0f9c7 Merge "Return "null" cycles for deprecated callers." into pi-dev
am: 9eb0a655cc

Change-Id: Ibe9928effca29598c59f440018977474debbee4b
2018-04-14 18:39:00 -07:00
Jeff Sharkey
e67463db5f Return "null" cycles for deprecated callers.
Callers using the deprecated Pair<ZonedDateTime, ZonedDateTime>
interface don't always check hasNext() before calling next(), so
give them (null, null) results instead of throwing.

Bug: 78020489
Test: builds, boots
Change-Id: Ibaeac646fa4e12e3e748cd7c706524d51dbeaafe
2018-04-13 14:38:04 -06:00
Chalard Jean
53b2e589cd Merge "Add a new ssid field in NetworkCapabilities." into pi-dev am: 878d0e90b5
am: 8edf6543d2

Change-Id: I6dd1aba6fde5a502b4a9145cf16393d8ce623c89
2018-04-13 02:23:18 -07:00
Chalard Jean
8edf6543d2 Merge "Add a new ssid field in NetworkCapabilities." into pi-dev
am: 878d0e90b5

Change-Id: Ia1f4e51b7c2e9118789242cf6d9e7576c4167cda
2018-04-13 02:14:02 -07:00
TreeHugger Robot
878d0e90b5 Merge "Add a new ssid field in NetworkCapabilities." into pi-dev 2018-04-13 08:59:23 +00:00
Chalard Jean
b03a6229b8 Add a new ssid field in NetworkCapabilities.
Bug: 77891227
Test: frameworks-net
Change-Id: Ifba33ecd48ccecce7e8f8d05ff70bb85653f6163
2018-04-13 15:38:35 +09:00
Jeff Sharkey
dcc615a028 Merge "APIs to disable data usage notifications." into pi-dev am: f0b9fbebc0
am: 568a972669

Change-Id: I8bfcf47c10e5f43f963fe012e98d0afd83630e64
2018-04-11 16:51:25 -07:00