Commit Graph

3544 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
568a972669 Merge "APIs to disable data usage notifications." into pi-dev
am: f0b9fbebc0

Change-Id: I7b5bd380f00b6e94da79f43b354ecfc52df3f8e4
2018-04-11 16:14:26 -07:00
TreeHugger Robot
f0b9fbebc0 Merge "APIs to disable data usage notifications." into pi-dev 2018-04-11 23:05:03 +00:00
Jeff Sharkey
0a5570d49d APIs to disable data usage notifications.
Certain carriers have requested the ability to disable the warning,
limit, and rapid data usage notifications shown by the OS, so give
them that ability on a per-subId basis.  (The notifications are still
enabled by default.)

Unhide NOT_CONGESTED to match setSubscriptionOverrideCongested().

Fix bug in getPrimarySubscriptionPlanLocked() to find the first
currently active plan; the first non-recurring plan may be no longer
active.  Fix bug in SubscriptionPlan which allowed invalid negative
or zero-length Period objects.

Bug: 77851691, 77506882, 77662747
Test: atest com.android.server.NetworkPolicyManagerServiceTest
Test: atest android.telephony.cts.SubscriptionManagerTest
Exempt-From-Owner-Approval: SDK deadline, responding to API feedback
Change-Id: Ib6e6dbadd5022937c3f0661ab4b66aa617f0b5af
2018-04-11 22:07:40 +00:00
Nathan Harold
adff790058 Merge "[DO NOT MERGE] - Hide Tunnel Mode IpSec API" into pi-dev
am: 68e5f0f242

Change-Id: I2542b4dcb94b306e3fe2e3e87051f1bd6a481561
2018-04-11 11:39:56 -07:00
Nathan Harold
68e5f0f242 Merge "[DO NOT MERGE] - Hide Tunnel Mode IpSec API" into pi-dev 2018-04-11 17:09:07 +00:00
Pavel Maltsev
1b8c42d15f Merge "Remove unwanted capabilitiy from the java-doc" into pi-dev
am: 1856d61f9a

Change-Id: I7fef43cce3cfe17dae6a5e4f564ad8857371502a
2018-04-10 20:58:01 -07:00
TreeHugger Robot
1856d61f9a Merge "Remove unwanted capabilitiy from the java-doc" into pi-dev 2018-04-11 03:26:22 +00:00
Nathan Harold
0486b927b3 [DO NOT MERGE] - Hide Tunnel Mode IpSec API
Hide the tunnel mode of the IpSec API because
there is a disincentive to launch it without
a supported customer use case. That use case,
IWLAN is having its APIs hidden, so we should
hide these as well to avoid constraining future
implementation.

Also, due to issues with the lifetime of the NATT
management object, this API needs to be hidden
until such time as the lifetime of the Keepalive
can be handled independently of the lifetime of
a Transform.

Bug: 72523623
Test: compilation (api removal)
Change-Id: I076030bdbab1cd7d69f6a034577d529970b050dc
2018-04-10 19:24:07 -07:00
Jeff Sharkey
4862a62845 Merge "Disable roaming sanity checking." into pi-dev
am: 75f9459c21

Change-Id: I93bb07583ef90fb8c31c5c9a0c3e2c6e4968f975
2018-04-09 18:15:36 -07:00
Chad Brubaker
1c0e63f2fd Merge "Make isSameTrustConfiguration public API" into pi-dev
am: eed55b3b15

Change-Id: I0cfc2eda840f58194d7054930a3111a15a8b8e4b
2018-04-09 18:07:59 -07:00
Jeff Sharkey
4cd485f8e5 Merge "API council requested tweaks to SubscriptionPlan." into pi-dev
am: 5e0d360411

Change-Id: I447d4041d1dd0751147d13792b07d6617b27978a
2018-04-09 17:09:34 -07:00
Jeff Sharkey
75f9459c21 Merge "Disable roaming sanity checking." into pi-dev 2018-04-09 23:57:28 +00:00
TreeHugger Robot
eed55b3b15 Merge "Make isSameTrustConfiguration public API" into pi-dev 2018-04-09 23:53:18 +00:00
Jeff Sharkey
5e0d360411 Merge "API council requested tweaks to SubscriptionPlan." into pi-dev 2018-04-09 23:20:43 +00:00