Commit Graph

4986 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
38468e9f2f Merge "Allow null subscriberId in NetworkStatsManager." into pi-dev 2018-03-30 07:39:23 +00:00
Lorenzo Colitti
dbc568ceaf Merge "Mark networks with OEM_PAID always restricted" 2018-03-30 07:00:54 +00:00
Pavel Maltsev
8cb5245570 Mark networks with OEM_PAID always restricted
Bug: 68762530
Exempt-From-Owner-Approval: OWNERS have approved, but gerrit doesn't see it
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest
Change-Id: Ieadef7c42634d890281543226203530fb18eb0a3
2018-03-30 07:00:39 +00:00
Lorenzo Colitti
d78344d704 Merge "Require explicitly supplied truncation length"
am: 2db4d5fbda

Change-Id: I20f7f910f4f0369e38eebd0b7fe6970331763e85
2018-03-30 06:48:22 +00:00
Lorenzo Colitti
57498b9359 Merge "Clarify UDP encapsulation socket API" am: db1e624ee1
am: bdc59ca370

Change-Id: I5fcf79691c670e710e46b3a9eac8a580c44028fb
2018-03-30 06:48:17 +00:00
Chalard Jean
f0473e8650 Limit the number of routes for performance
In evaluating whether "most" of the addressing space is
covered, the list of routes are obtained from a third-party
app, so it's possbile the system service stalls unless
some limit is enforced on how much work it has to do.
This change limits the number of routes to 400, as determined
by time measurement on various devices.

Bug: 74176086
Test: runtest framework-net
Change-Id: Ie4a96098bc044ade87b188839586f14dd101c100
2018-03-30 15:41:50 +09:00
Chalard Jean
7f5163f453 Merge "Limit the number of routes for performance" 2018-03-30 06:40:29 +00:00
Chalard Jean
b1016fbf14 Merge "Clarify documentation for getActiveNetworkInfo and friends" 2018-03-30 06:37:22 +00:00
Lorenzo Colitti
bdc59ca370 Merge "Clarify UDP encapsulation socket API"
am: db1e624ee1

Change-Id: Ie1e7ea81440afee2618211d989989cf5daff3e1e
2018-03-30 06:35:22 +00:00
Benedict Wong
2e1ebb60e6 Require explicitly supplied truncation length
Instead of providing default truncation lengths (based on RFC or
otherwise), this change imposes a restriction that the truncation length
must be supplied for all auth or aead algorithms.

Bug: 77204048
Test: Updated tests, ran on walleye
Merged-In: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
Change-Id: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
(cherry picked from commit bb7f2820f5bcccf8618078c2cbe4ea9836797e3b)
2018-03-29 23:07:42 -07:00
Benedict Wong
c165885206 Clarify UDP encapsulation socket API
This change updates the getSocket() methods for IPsec to improve clarity
of the return types, both for public APIs, and internal-only methods.

Bug: 72473753
Test: APIs updated, CTS + unit tests ran.
Merged-In: I0afebd432c5d04c47c93daa1ce616d712aa323d7
Change-Id: I0afebd432c5d04c47c93daa1ce616d712aa323d7
(cherry picked from commit 4c987ebade580d4abc8a3d549e0df90baab33140)
2018-03-29 23:05:42 -07:00
Lorenzo Colitti
2db4d5fbda Merge "Require explicitly supplied truncation length" 2018-03-30 04:59:22 +00:00
Lorenzo Colitti
db1e624ee1 Merge "Clarify UDP encapsulation socket API" 2018-03-30 04:58:47 +00:00
Chalard Jean
96d10a75b6 Clarify documentation for getActiveNetworkInfo and friends
For VPNs it's unobvious what these methods do, so document that.

Bug: 70917007
Test: Comment changes only. Checkdoc passes.
Change-Id: I31ec1aea356d88d969eaf9fc7d8c2ed13ce924eb
2018-03-30 12:22:06 +09:00
Remi NGUYEN VAN
65ffbafe88 Allow null subscriberId in NetworkStatsManager.
Use a MATCH_MOBILE_WILDCARD template to avoid filtering by
subscriberId when querying statistics from NetworkStatsService.

Bug: 74038898
Change-Id: I8296220472a9ba37044dd1a5ede9bdb45d3ed339
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
Merged-In: I1e4e283c6eaecf33d12488e41e0c524f6ff83954
Merged-In: Ia84d2c7cc63bf8b8bf30f133e0382fd7103bf490
(cherry-picked from aosp I4b39e7031416cb33b23d89aa36ff0f774eaa942f)
2018-03-30 12:18:23 +09:00
Paul Jensen
55eaa09f96 Fix socket leaks in various android.net.Network methods.
Bug: 72124526
Test: make CtsNetTestCases
Change-Id: I3398b67272360f894e01a8cdfbc47b17d77c2330
2018-03-29 07:43:01 -04:00
Paul Jensen
b895ac0fe6 Add Network.fromNetworkHandle()
This is the counterpart to Network.getNetworkHandle() and facilitates
native code calling back to Java with network handle values from
getNetworkHandle.

Bug: 77210159
Bug: 64148938
Test: make CtsNetTestCases

Change-Id: I032b959d84180c063a79ddd97c35e7384b0f50a1
2018-03-29 07:24:59 -04:00
Chalard Jean
459c9109ca Limit the number of routes for performance
In evaluating whether "most" of the addressing space is
covered, the list of routes are obtained from a third-party
app, so it's possbile the system service stalls unless
some limit is enforced on how much work it has to do.
This change limits the number of routes to 400, as determined
by time measurement on various devices.

Bug: 74176086
Test: runtest framework-net
Change-Id: Ie4a96098bc044ade87b188839586f14dd101c100
2018-03-29 18:13:23 +09:00
Chalard Jean
33703ef8a7 Clarify documentation for getActiveNetworkInfo and friends
For VPNs it's unobvious what these methods do, so document that.

Bug: 70917007
Test: Comment changes only. Checkdoc passes.
Change-Id: I31ec1aea356d88d969eaf9fc7d8c2ed13ce924eb
2018-03-29 18:10:56 +09:00
Remi NGUYEN VAN
c83f2378e3 Merge "Fix network usage stats on 464xlat tethered." am: 83088dcd8e
am: 7ea8c51311

Change-Id: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
2018-03-29 07:46:34 +00:00
Remi NGUYEN VAN
7ea8c51311 Merge "Fix network usage stats on 464xlat tethered."
am: 83088dcd8e

Change-Id: I0e13c2a6b9f6b5d0701a073ddc835781d5d2aace
2018-03-29 07:36:21 +00:00
Benedict Wong
5f38c02385 Require explicitly supplied truncation length
Instead of providing default truncation lengths (based on RFC or
otherwise), this change imposes a restriction that the truncation length
must be supplied for all auth or aead algorithms.

Bug: 77204048
Test: Updated tests, ran on walleye
Change-Id: I4a0e2e71aa97259e56f44e7c8a2ce53135708d97
2018-03-28 18:02:54 -07:00
Pavel Maltsev
089fe77ba7 Make addUnwantedCapability method public
Allow apps to specify a list of capabilities that network must not have
in order to satisfy the request.

Bug: 72828388
Test: m -j
Change-Id: I91ee54963f7b92899c7a107b3a450b268c62fd8d
2018-03-28 15:09:50 -07:00
Jeff Sharkey
e5886f37ec API council requested tweaks to NetworkRequest.
If you put values into the Builder, you should be able to observe
those values on the built object.

Test: atest android.net.cts.NetworkRequestTest
Bug: 74945408
Change-Id: I9aacceb82c98f7881f0eb5e1106d89d469b816a7
2018-03-28 14:02:00 -06:00
Pavel Maltsev
1868811e8f Add OEM_PAID capability to system api
Some system apps should be able to request OEM_PAID networks.  This
makes a lot of sense when Android is used as in-vehicle infotainment
systems.

Bug: 68762530

Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Change-Id: Ic916de7522a9f803a2410bc4e3e82101fd9d0dbd
2018-03-27 23:17:14 -07:00
Pavel Maltsev
19d1da7a95 Merge "Merge "Minor clean-up in NetworkCapabilities" am: 1dd43b192c am: 6ab3c9c246 am: 5d97ad9fe4" into pi-dev
am: 601861fd1c

Change-Id: I6605aad319ea268827f47d95fb6aef7c4c07ae93
2018-03-28 05:28:17 +00:00
Remi NGUYEN VAN
c19a5eb8e4 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage

Change-Id: I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda
2018-03-28 12:14:14 +09:00
Benedict Wong
a042c3f82b Clarify UDP encapsulation socket API
This change updates the getSocket() methods for IPsec to improve clarity
of the return types, both for public APIs, and internal-only methods.

Bug: 72473753
Test: APIs updated, CTS + unit tests ran.
Change-Id: I0afebd432c5d04c47c93daa1ce616d712aa323d7
2018-03-27 19:46:50 -07:00
Pavel Maltsev
51f4d8a11d Merge "Minor clean-up in NetworkCapabilities" am: 539f85a18d am: b1e2bfe4df
am: 8a956a5141

Bug: 72828388
Test: frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest

Change-Id: I2f45d2c70c7c0142ae3b3ce9e6329c5f25b63380
(cherry picked from commit feb8d1498a822730e29cf346fe3382e3f5293a58)
2018-03-27 22:45:49 +00:00
Tony Mak
6dd26947ad Merge "Get application info in the correct user id" into pi-dev
am: 28a696afb4

Change-Id: I763a8fae339cb9ca56b713c695d3e97e3c46c3d5
2018-03-26 17:15:29 +00:00
Tony Mak
28a696afb4 Merge "Get application info in the correct user id" into pi-dev 2018-03-26 17:04:47 +00:00
Ricky Wai
24c776f0c4 Merge "Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc" into pi-dev
am: 2ce1e6ce2a

Change-Id: Ic3de4d136a995a8291fb43c780a311e423aeb9b7
2018-03-26 17:01:45 +00:00
Michael West
07e389da47 Merge "add airplane mode shell commands to connectivity" into pi-dev
am: e0c1ee6414

Change-Id: I81fd444f1364c394d17759c261798b3a3f85b826
2018-03-26 16:51:00 +00:00
Ricky Wai
2ce1e6ce2a Merge "Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc" into pi-dev 2018-03-26 16:46:20 +00:00
Michael West
e0c1ee6414 Merge "add airplane mode shell commands to connectivity" into pi-dev 2018-03-26 16:38:03 +00:00
Tony Mak
2f6bcd9c06 Get application info in the correct user id
Fixes: 76396560

Test: Create work profile and launch hangouts in work profile.
Change-Id: Ic3727ac899153b6a96dd9b6d6921c32ba0bbd93e
2018-03-26 11:58:38 +00:00
Erik Kline
eac4afb474 [automerger skipped]Merge "Pass all relevant resolver info to netd" into pi-dev
am: ca697c621e  -s ours

Change-Id: I5d2271059f77d290c65cd4a55d31334154e82270
2018-03-24 16:12:38 +00:00
Erik Kline
c54b9cb71a Pass all relevant resolver info to netd
Test: runtest frameworks-net passes
Test: manual testing of opportunistic and strict mode works
Bug: 34953048
Bug: 64133961
Bug: 72345192
Merged-In: I96f7747b8f0bb38d95579b688b4c2d068f1229cf
Merged-In: Ia4d896c4cc33c02f0c46d5d4c760cc33b13dff0b
Change-Id: Ia4f1905e1fa60e7a468c2246fb809191d2ba796b
(cherry picked from commit e5dac904d361a349f1cfc48500a678d22e3a7316)
2018-03-23 21:59:24 -07:00
mswest46
32928412a2 add airplane mode shell commands to connectivity
Fixes: 74410990
Test: Manually checked that commands enable/disable airplane mode.

Change-Id: I942bd4679fcd498a39b9b2cab68e8d3c00ce62d3
2018-03-24 01:53:45 +00:00
Erik Kline
905e6feea0 Merge "Pass all relevant resolver info to netd" am: ce907ddfc4
am: 189415933f

Change-Id: I96f7747b8f0bb38d95579b688b4c2d068f1229cf
2018-03-24 01:16:37 +00:00
Erik Kline
189415933f Merge "Pass all relevant resolver info to netd"
am: ce907ddfc4

Change-Id: If4f46b030fe141a6904a48966e5ab34ffb6b10bc
2018-03-24 01:07:10 +00:00
Treehugger Robot
ce907ddfc4 Merge "Pass all relevant resolver info to netd" 2018-03-23 23:41:11 +00:00
Chalard Jean
52321d6b28 Merge "Have the status bar listen to all macro-users VPN changes." into pi-dev
am: 749299b1c5

Change-Id: I4e9887a438abfa1a5c9456c73c019c96193e9111
2018-03-23 09:35:34 +00:00
Chalard Jean
cc097d159f Merge "Have the status bar listen to all macro-users VPN changes." am: 90988528c3
am: cdb95af156

Change-Id: Ib4daa5f4136662721794bd8bcd4f185cb2944824
2018-03-23 09:29:28 +00:00
TreeHugger Robot
749299b1c5 Merge "Have the status bar listen to all macro-users VPN changes." into pi-dev 2018-03-23 09:26:46 +00:00
Chalard Jean
cdb95af156 Merge "Have the status bar listen to all macro-users VPN changes."
am: 90988528c3

Change-Id: Icc4fe4fbdb75c90abaaee8009f08f1220536686e
2018-03-23 09:22:36 +00:00
Chalard Jean
36c387a51b Merge "Have PermissionMonitor arbiter which app can access background networks" am: 433c0e652f
am: 3f05f98daa

Change-Id: I803bdbfd9344d3d2a8bd312f98a1f63636e47cd9
2018-03-23 08:22:47 +00:00
Chalard Jean
3f05f98daa Merge "Have PermissionMonitor arbiter which app can access background networks"
am: 433c0e652f

Change-Id: Ic05e362af58d667b5be84c3bd421c9250927abe2
2018-03-23 08:12:51 +00:00
Chalard Jean
90988528c3 Merge "Have the status bar listen to all macro-users VPN changes." 2018-03-23 07:33:02 +00:00
Erik Kline
286974f384 Pass all relevant resolver info to netd
Test: runtest frameworks-net passes
Test: manual testing of opportunistic and strict mode works
Bug: 34953048
Bug: 64133961
Bug: 72345192
Change-Id: Ia4f1905e1fa60e7a468c2246fb809191d2ba796b
2018-03-22 23:50:13 -07:00