Commit Graph

4703 Commits

Author SHA1 Message Date
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
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
28a696afb4 Merge "Get application info in the correct user id" into pi-dev 2018-03-26 17:04:47 +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
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
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
38354d1f60 Have PermissionMonitor arbiter which app can access background networks
This will let ConnectivityService send the right callbacks to the
relevant apps.

Test: manual with apps
      runtest frameworks-net
      cts
      new tests for this functionality
Bug: 67408339

Change-Id: I6f08efd9e73c7e191f833d7f307a3bf4c9e2f0b4
2018-03-23 13:37:56 +09:00
Ricky Wai
04baf117bf Improve ConnectivityManager.getNetworkWatchlistConfigHash() javadoc
Test: NULL
Bug: 74831039
Change-Id: I227ba1377a51821204cd5830e7da6ff3a15bca02
2018-03-22 20:13:05 +00:00
Chalard Jean
7c74b9f311 Have the status bar listen to all macro-users VPN changes.
Bug: 73217368
Test: manual
      Using Datally on work profile. Before this, enabling the VPN
      does not show the key icon. After this it does.

Change-Id: I454eb8f3881a48af1b0187c2b14a2a399d3c2445
2018-03-22 13:25:52 +09:00
Nathan Harold
bfcc17cc20 Check mOwnedByTransform to avoid DELSA on SPI
The owned by transform flag prevents the removal
of an SPI from accidentally deleting an associated
SA in the kernel. That flag wasn't actually being
checked, so deleting an SPI would result in the
transform being removed.

The existing code already guarantees that the SA is
deleted when the transform is deleted

Bug: 73258845
Test: runtest frameworks-net
Merged-In: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
Change-Id: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
(cherry picked from commit 22795302be4ec35449908cf566aa7c16945df836)
2018-03-20 18:29:02 -07:00
Benedict Wong
76df78ffbf Added implementation for VTI add/remove address
This change adds implementation details for add/remove addresses onto a
VTI.

Bug: 73675031
Test: New tests added, passing on Walleye
Merged-In: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
Change-Id: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
(cherry picked from commit ecc9f7cc08804e3fa15fea04ae94ea1bc74edbfe)
2018-03-20 16:01:27 -07:00
Chalard Jean
bf7610aa8a Merge "Deprecate most of NetworkInfo." into pi-dev 2018-03-10 07:51:11 +00:00
Chalard Jean
7eaf3b10e5 Deprecate most of NetworkInfo.
getType, getTypeName, isConnectedOrConnecting, isConnected,
isAvaisable, isFailover, isRoaming, getState, getDetailedState,
getReason, and the TYPE_* constants in ConnectivityManager
along with methods that use them are now stacked on a boat
bound for the other side of the Styx.

Test: no code changes
Bug: 62844794
Change-Id: Idd70763de5b1af5580b4734cd443ac4b570069cc
2018-03-09 16:52:20 +09:00
Chad Brubaker
caced413da Expose CONNECTIVITY_ACTION to Instant Apps
Test: Broadcast is visible to Instant Apps
Bug: 69421898
Change-Id: I8435e7723cf7a722668b97ff087d1f4453d3e7b7
2018-03-08 10:37:09 -08:00
Andreas Gampe
85c8c3d822 Connectivity: Fix map access
Found by Errorprone.

Bug: 73288226
Test: mmma frameworks/base/services
Merged-In: I1c4b35811c72d389e53e28c3eb1b411009471b92
Merged-In: Ice91ac58257551485231da4664027a281237de4b
Merged-In: I7d2f578b54c69139be8b887a2381ac1b2e0673a3
Change-Id: I63edad58dbc909c1e772bde85a1b9dd98c551fb1
(cherry picked from commit 3ba8106c23cdf518527f75beaabb48bf3182fb4d)
2018-03-07 11:36:57 +09:00
Pavel Maltsev
1016f7327a Merge "Extend network request to query networks w/o capabilites" am: 47d4d15483 am: 334cde1ec2
am: fa04c2d802

Change-Id: I3bf776767be61577f1bca0d98d4aaf82a0e45336
2018-03-03 00:14:52 +00:00
Pavel Maltsev
fa04c2d802 Merge "Extend network request to query networks w/o capabilites" am: 47d4d15483
am: 334cde1ec2

Change-Id: Ie0c4fa4648c235589fecd79a25d28f1e62025fb7
2018-03-03 00:03:37 +00:00
Pavel Maltsev
334cde1ec2 Merge "Extend network request to query networks w/o capabilites"
am: 47d4d15483

Change-Id: Id1d86938fa2d5aff4dbf9cde87548d80c76674d9
2018-03-02 23:52:18 +00:00
Treehugger Robot
47d4d15483 Merge "Extend network request to query networks w/o capabilites" 2018-03-02 19:04:31 +00:00
Chalard Jean
0a8dbc7886 Merge "Give apps with NETWORK_SETTINGS right to see any VPN." am: faed85f2b0 am: 331e50f601
am: ec7c68cb2b

Change-Id: I9a9d0eb212f6de105abc070a1eb5ff698b4e67bc
2018-03-02 13:25:02 +00:00
Chalard Jean
ec7c68cb2b Merge "Give apps with NETWORK_SETTINGS right to see any VPN." am: faed85f2b0
am: 331e50f601

Change-Id: I7f08217c5abc86a8784b91145f1b02d6693b3919
2018-03-02 13:17:23 +00:00
Chalard Jean
331e50f601 Merge "Give apps with NETWORK_SETTINGS right to see any VPN."
am: faed85f2b0

Change-Id: Iab9c8df6071e6dec35b5f492eb8344ba370e0036
2018-03-02 13:10:45 +00:00
Chalard Jean
562e154642 Merge "Give VPNs the INTERNET capability when they route most of the IP space" am: f477aedec5 am: 7506c131c1
am: 941de3f74c

Change-Id: Ifd77149ca2c45249b8776c878c6fac46ae81c2a4
2018-03-02 12:54:29 +00:00
Chalard Jean
941de3f74c Merge "Give VPNs the INTERNET capability when they route most of the IP space" am: f477aedec5
am: 7506c131c1

Change-Id: I33c6fcc72753e00af601cf915aa78416174a3871
2018-03-02 12:46:46 +00:00
Chalard Jean
7506c131c1 Merge "Give VPNs the INTERNET capability when they route most of the IP space"
am: f477aedec5

Change-Id: Icd1466c79d2593fcab5bd2e31a1acb3a36a705da
2018-03-02 12:34:25 +00:00
Chalard Jean
faed85f2b0 Merge "Give apps with NETWORK_SETTINGS right to see any VPN." 2018-03-02 11:52:15 +00:00
Chalard Jean
f477aedec5 Merge "Give VPNs the INTERNET capability when they route most of the IP space" 2018-03-02 11:18:10 +00:00
Chalard Jean
9a396cc3c6 Give apps with NETWORK_SETTINGS right to see any VPN.
...not only the ones that apply to them.

Bug: 73217368
Test: runtest frameworks-net and CTS
Change-Id: I436972a3e51e98bdd815771b451bcedadf684763
2018-03-02 17:10:11 +09:00
Chalard Jean
9cbc882c08 Give VPNs the INTERNET capability when they route most of the IP space
Test: manual, plus wrote some new tests for this
Bug: 72765718
Change-Id: I9759da72b752fd8eeb1d0647db9ab341f04c0528
2018-03-02 16:20:22 +09:00
Pavel Maltsev
7c600431b5 Extend network request to query networks w/o capabilites
Add another bit mask into NetworkCapabilities class that represents
unwanted capabilities and corresponding methods to add and remove them.

Bug: 72828388
Bug: 68762530

Test: runtest -x frameworks/base/tests/net/
Change-Id: Ie291167eb74fdb696c7ee145c8cc46ea8115d6ba
2018-03-01 17:52:02 -08:00
Chalard Jean
3f1d0bb1a3 Merge "Fix up NetworkCapabilities' toString" am: a23d640426 am: 03580e0ccd
am: 26afb962f5

Change-Id: I3d3f3f34f30b69750e197b185c4e70bd360f35e0
2018-03-01 06:13:04 +00:00
Chalard Jean
26afb962f5 Merge "Fix up NetworkCapabilities' toString" am: a23d640426
am: 03580e0ccd

Change-Id: I2f1578589232c49574dbf401d7f4becfa350a1c0
2018-03-01 05:56:33 +00:00
Chalard Jean
03580e0ccd Merge "Fix up NetworkCapabilities' toString"
am: a23d640426

Change-Id: I21e66bc78a763f9e37725f50ca8b406ac7259518
2018-03-01 05:48:14 +00:00
Chalard Jean
a23d640426 Merge "Fix up NetworkCapabilities' toString" 2018-03-01 04:01:16 +00:00
Chalard Jean
4409dfa9c7 Fix up NetworkCapabilities' toString
Test: manual
Change-Id: I3bcec6a6873e8ec7ced0820d3d5b92249b19fe0a
2018-02-28 19:47:48 +09:00
Pavel Maltsev
013f8a445f Merge "Add OEM_PAID network capability" am: 2501283064 am: 82fdea2d7b
am: 5cb05a12bd

Change-Id: Id64d288764dc5a556b60f5e3b866b40792647ac0
2018-02-28 08:42:24 +00:00
Pavel Maltsev
5cb05a12bd Merge "Add OEM_PAID network capability" am: 2501283064
am: 82fdea2d7b

Change-Id: Ie0377fea66f784c910bd0a06f87543cc5cf82c84
2018-02-28 08:28:25 +00:00
Pavel Maltsev
82fdea2d7b Merge "Add OEM_PAID network capability"
am: 2501283064

Change-Id: I2fb8825bc1038783ef45907846b52192b6fe5d18
2018-02-28 08:14:48 +00:00
Treehugger Robot
2501283064 Merge "Add OEM_PAID network capability" 2018-02-28 07:06:00 +00:00
Andreas Gampe
5781efe42a Merge "Frameworks: Annotate JUnit4 test with @Test" am: 4d9bec6b4a am: a7c5afafe3
am: 0bf88228ca

Change-Id: I0c611c22eedda2d849bd16ef2e2bb7e2e60e0a5a
2018-02-27 19:39:51 +00:00
Andreas Gampe
0bf88228ca Merge "Frameworks: Annotate JUnit4 test with @Test" am: 4d9bec6b4a
am: a7c5afafe3

Change-Id: I70e11136f6e261cccf4ce57f757f97999f74b402
2018-02-27 19:19:01 +00:00
Andreas Gampe
a7c5afafe3 Merge "Frameworks: Annotate JUnit4 test with @Test"
am: 4d9bec6b4a

Change-Id: I0c684a434a0f43fcae1a766c6c84a756115d9dcb
2018-02-27 19:07:49 +00:00
Andreas Gampe
94bb3f9b9e Frameworks: Annotate JUnit4 test with @Test
Mollify Errorprone.

Bug: 72076216
Test: m javac-check RUN_ERROR_PRONE=true
Test: atest IpSecServiceParameterizedTest
Change-Id: Ia3a253c4c5994937efc0f498ac047c5fb4eee3e9
2018-02-26 08:09:26 -08:00
Jeff Sharkey
d7fce6abbd Name specific app for rapid data usage.
When a single app is responsible for more than half of the data usage
that caused us to trigger a "rapid usage" alert, name that app in the
notification.  Tests to verify.

Move NPMS->NSS direct calls to "Internal" pattern, following
best-practices to avoid unnecessary AIDL exposure.

Remove 3G/4G split mobile plan support, which has been deprecated for
years and was never supported in a shipping product.

Move MultipathPolicyTracker in tree to reflect its package name.

Test: bit FrameworksNetTests:*
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 69263587, 64221505, 73431080, 72746951
Exempt-From-Owner-Approval: approved in previous PS
Change-Id: I3e4ec1ae2222d51b232f76f32faca93d4f8cd272
2018-02-23 16:27:39 +00:00
nharold
2b1592206b Merge "Fix ConnectivityServiceTest for NATT Keepalive" am: cab3e6009c am: 4e2e3f823b
am: 3a5a4efd8a

Change-Id: I2ce9d740b82f591b847150ec1eaffa39bfbd0241
2018-02-20 23:21:59 +00:00
nharold
3a5a4efd8a Merge "Fix ConnectivityServiceTest for NATT Keepalive" am: cab3e6009c
am: 4e2e3f823b

Change-Id: I3c28cbb55f8226776792df9cacf1b5e527389157
2018-02-20 23:07:53 +00:00
nharold
4e2e3f823b Merge "Fix ConnectivityServiceTest for NATT Keepalive"
am: cab3e6009c

Change-Id: Idbdffc7bbd2d9a96f6e6052810722df04a20a65c
2018-02-20 22:55:38 +00:00