Commit Graph

4754 Commits

Author SHA1 Message Date
Chalard Jean
e15d4ceee3 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 15:38:25 +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
Pavel Maltsev
5d97ad9fe4 Merge "Minor clean-up in NetworkCapabilities" am: 1dd43b192c
am: 6ab3c9c246

Change-Id: Ie6839576f61563f2a82fec53afc42208f5a37f3c
2018-03-07 23:09:04 +00:00
Pavel Maltsev
6ab3c9c246 Merge "Minor clean-up in NetworkCapabilities"
am: 1dd43b192c

Change-Id: Ic70f545a4886461f38f1af934600f4e1afe0179f
2018-03-07 23:00:53 +00:00
Treehugger Robot
1dd43b192c Merge "Minor clean-up in NetworkCapabilities" 2018-03-07 21:06:59 +00:00
Andreas Gampe
2a0cf0d5c5 Merge "Connectivity: Fix map access" into pi-dev
am: 1fff4c000d  -s ours

Change-Id: I03b95b31613c6cfd702497e822c5690f78547b21
2018-03-07 05:01:53 +00: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
Remi NGUYEN VAN
1252af5564 Merge "Allow null subscriberId in NetworkStatsManager." am: 09639d8ad0
am: cbcf2a49ea

Change-Id: I1e4e283c6eaecf33d12488e41e0c524f6ff83954
2018-03-06 19:52:57 +00:00
Andreas Gampe
97442c25ec Merge "Connectivity: Fix map access" am: a1b71308b5
am: 89c0d57a15

Change-Id: Ice91ac58257551485231da4664027a281237de4b
2018-03-06 19:38:18 +00:00
Remi NGUYEN VAN
cbcf2a49ea Merge "Allow null subscriberId in NetworkStatsManager."
am: 09639d8ad0

Change-Id: I900ac14224284fc3a1422e8791bc54d6a9ee77ba
2018-03-06 19:37:13 +00:00
Andreas Gampe
89c0d57a15 Merge "Connectivity: Fix map access"
am: a1b71308b5

Change-Id: I3c1fea926fda1d70e38746378191100bb825758f
2018-03-06 19:20:32 +00:00
Lorenzo Colitti
9423045c3d Merge "Minor cleanups to NetworkStats interface tracking." am: 6455e31b76
am: 9d04a8c92d

Change-Id: Ifa76adb79440b1d97c6cfc637509c0ddaefa76fa
2018-03-06 07:47:11 +00:00
Lorenzo Colitti
9d04a8c92d Merge "Minor cleanups to NetworkStats interface tracking."
am: 6455e31b76

Change-Id: I84aad4b9815196e0362d6adba34359a260853f46
2018-03-06 07:28:20 +00:00
Remi NGUYEN VAN
09639d8ad0 Merge "Allow null subscriberId in NetworkStatsManager." 2018-03-06 06:52:35 +00:00
Treehugger Robot
a1b71308b5 Merge "Connectivity: Fix map access" 2018-03-06 05:39:39 +00:00
Remi NGUYEN VAN
a08eb7203b 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: I4b39e7031416cb33b23d89aa36ff0f774eaa942f
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
2018-03-06 13:28:19 +09:00
Andreas Gampe
39744fd0c7 Connectivity: Fix map access
Found by Errorprone.

Bug: 73288226
Test: mmma frameworks/base/services
Change-Id: I63edad58dbc909c1e772bde85a1b9dd98c551fb1
2018-03-05 17:23:07 -08:00
Lorenzo Colitti
54ddecb0f8 Minor cleanups to NetworkStats interface tracking.
Currently, when a network goes into CONNECTED state, we call
updateLinkProperties and then notifyIfacesChangedForNetworkStats.
The latter is unnecessary, as there are exactly two cases:

1. networkAgent.linkProperties != null: updateLinkProperties will
   call notifyIfacesChangedForNetworkStats, because oldLp is null
   and networkAgent.linkProperties is not null.
2. networkAgent.linkProperties is null: there is no need to call
   notifyIfacesChangedForNetworkStats, because no interfaces were
   added or removed. When they are, updateLinkProperties will be
   called again.

Removing the call to notifyIfacesChangedForNetworkStats avoids
a stats poll, which is a minor performance improvement.

Also, remove the NetworkStatsService code to do asynchronous
interface updates, since it has no callers.

Bug: 72107146
Test: builds, boots
Test: runtest frameworks-net
Change-Id: I9337ea26c0505a1c66ceda01254b68e25cd7972c
2018-03-05 15:48:23 +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
15e839f111 Minor clean-up in NetworkCapabilities
Follow up clean up for aosp/606338

Bug: 72828388
Test: frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest
Change-Id: I2d2cfeb51caaa339602f7d97ffffed6e4cfad432
2018-03-01 18:06:25 -08: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