Commit Graph

584 Commits

Author SHA1 Message Date
Sarah Chin
34fbbbb6b9 API to get network visible network capability name
Test: atest DataConnectionTest, DcTrackerTest
Bug: 181916712
CTS-Coverage-Bug: 183553812
Change-Id: Iae63ac4d62641cee2bd0f0c5f50dd729750d514c
2021-03-24 00:27:11 +00:00
Aaron Huang
c34dcd5c3e Merge "Remove Network, NetworkRequest metrics from jobscheduler" into sc-dev 2021-03-23 13:22:32 +00:00
Aaron Huang
7609660f73 Merge "Move deduceRestrictedCapability to libs/net and rename it" into sc-dev 2021-03-23 12:50:40 +00:00
TreeHugger Robot
3cccf48918 Merge "Expose NetworkAgent constructor taking a NetworkScore parameter" into sc-dev 2021-03-23 12:45:24 +00:00
Lucas Lin
d8e8a9557b Merge "Expose NetworkScore to external caller" into sc-dev 2021-03-23 12:18:23 +00:00
Frank Li
d968d80146 Merge "[JS01]Remove hidden API usage of Connectivity Sevice" into sc-dev 2021-03-23 10:22:28 +00:00
Aaron Huang
967f77c269 Remove Network, NetworkRequest metrics from jobscheduler
These metrics are deprecated so remove them from jobscheduler.
Also remove dumpDebug method from Network, NetworkRequest and
NetworkCapabilities because there's no caller anymore.

This change also for connectivity mainline module. These
three classes are inculded in framework-connectivity so
external module cannot have dependencies on its hidden API.
With this change, the dependencies can be removed.

Bug: 178777253
Test: FrameworksNetTests
      JobStoreTest
      adb shell dumpsys jobscheduler --proto
      CtsIncidentHostTestCases:JobSchedulerIncidentTest
Change-Id: Ie0c540303ba06b8fba029d2b98ae753afb08c963
2021-03-23 10:19:41 +00:00
Remi NGUYEN VAN
088c8f7707 Merge "Build service-connectivity with system_server API" into sc-dev 2021-03-23 09:18:53 +00:00
Chiachang Wang
3ee63e5132 Expose NetworkAgent constructor taking a NetworkScore parameter
Vpn constructs NetworkAgent with this exposed NetworkAgent
constructor. Given NetworkAgent is moving into the incoming
connectivity module, Vpn which is outside the module will not
be able to access it if it's not in the API surface. Thus,
expose it to allow Vpn to use it.

Bug: 182963397
Test: make update-api
Change-Id: Ic2357dcfff3233e0dd17b48b0e376a5095ef60fa
CTS-Coverage-Bug: 172183305
2021-03-23 08:51:05 +00:00
lucaslin
18158aa33b Expose NetworkScore to external caller
NetworkScore will be a part of mainline module, so the external
callers cannot call its hidden APIs. Expose needed APIs to
the external callers.

CTS-Coverage-Bug: 182963397
Bug: 182963397
Test: m
Change-Id: Iddf8c71a5f51a40bc6ff78626b3e8ee530d1b7eb
2021-03-23 16:17:37 +08:00
Remi NGUYEN VAN
56db6551f5 Merge "Add NDK API for getprocnetwork" into sc-dev 2021-03-23 07:11:06 +00:00
Remi NGUYEN VAN
f19e30d337 Build service-connectivity with system_server API
As all dependencies on hidden API have been removed, build
service-connectivity against system_server_current.

Bug: 171540887
Test: device boots, has connectivity
Change-Id: I454e8a0a8d0e0f9e6d21a8e8faf5a9e299962ad4
2021-03-23 06:06:03 +00:00
lifr
308bcccd2b [JS01]Remove hidden API usage of Connectivity Sevice
The Connectivity service will become the mainline module.
Therefore, remove the caller of using Connectivity's
hidden API outside the module and expose the required
connectivity API used in Jobscheduler.

Bug: 183456204
CTS-Coverage-Bug: 170598012
Test: atest JobStoreTest
Change-Id: Ie6bc81ff382fb242b98f35d28a96defc207c7987
2021-03-23 13:58:48 +08:00
Frank Li
6fa238f167 Merge "[TL02]Remove hidden API usage of NetworkAgent" into sc-dev 2021-03-23 02:03:59 +00:00
lifr
c4fd62072b [TL02]Remove hidden API usage of NetworkAgent
The connection service will become the mainline module.
Remove the hidden API usage of NetworkAgent.

Bug: 170598012
CTS-Coverage-Bug: 170598012
Test: atest FrameworksNetTests FrameworksTelephonyTests
      atest FrameworksWifiTests
Change-Id: I4e4040ae7f94bdf479c7df9ec2ffabafbe06331c
2021-03-23 02:01:38 +00:00
Lorenzo Colitti
1cd2428be0 Merge "[VCN15] expose addUnwantedCapability and related APIs" into sc-dev 2021-03-23 01:19:39 +00:00
Remi NGUYEN VAN
31f329e987 Add NDK API for getprocnetwork
The API is the getter couterpart for setprocnetwork.
Use it in NetworkUtils so that the NDK API can be the source of truth
for the process network.

Bug: 171540887
Test: atest CtsNetTestCases
      Tests in change I311b58585033c2ca50ce5477ea9cd94b6f127507
Change-Id: Ie8f68cf1fa57deddb63324c1abf3d6fd5b0ef500
2021-03-23 01:01:06 +00:00
Chiachang Wang
58c089a445 [automerger skipped] Expose uids related APIs in NetworkRequest and NetworkCapabilities am: 0ffaec3d50 -s ours am: 697286cfdb -s ours
am skip reason: skip tag Change-Id I107c329d4d7130d488772166eae8b5e7aaa2ff04 with SHA-1 aacf237c27 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13946380

Change-Id: I382cbac60469250d2be5a2ffb2fb51eafa082548
2021-03-22 19:56:22 +00:00
Chiachang Wang
38295ebfd1 [automerger skipped] Replace the usage of UidRange am: 14a86c3cbd -s ours am: 7de9042831 -s ours
am skip reason: skip tag Change-Id I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9 with SHA-1 4956b3225d is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13946379

Change-Id: Iedbd693caaa772adde8188c19bb17b2800fa6774
2021-03-22 19:56:15 +00:00
Joshua Mccloskey
08e81c327b Merge "Revert "Have a new method in NetworkAgentConfig.Builder to set allowBypass"" into sc-dev 2021-03-22 19:20:20 +00:00
Chiachang Wang
697286cfdb [automerger skipped] Expose uids related APIs in NetworkRequest and NetworkCapabilities am: 0ffaec3d50 -s ours
am skip reason: skip tag Change-Id If76877e6bde7abe3b5ddde078f87eefd027e675c with SHA-1 32996ff68f is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13946380

Change-Id: I1072a17b5977b5c2c4fdb8e04c59298c59c0d3c3
2021-03-22 19:12:39 +00:00
Chiachang Wang
7de9042831 [automerger skipped] Replace the usage of UidRange am: 14a86c3cbd -s ours
am skip reason: skip tag Change-Id Idb7f353788c5779a4fbbd107595e9326b99fe0a8 with SHA-1 545aafdd16 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13946379

Change-Id: I3e7a0c612ee4ca37bf5567d5ec1297cf14671337
2021-03-22 19:12:32 +00:00
Joshua Mccloskey
02da918919 Revert "Have a new method in NetworkAgentConfig.Builder to set allowBypass"
This reverts commit 974644dd3c.

Reason for revert: Broken build b/183416288

Change-Id: Id9ec9fb98b8f88eeb7db1d1442d76456aaf350d1
2021-03-22 18:55:32 +00:00
Chiachang Wang
81d18fffe6 [automerger skipped] Expose uids related APIs in NetworkRequest and NetworkCapabilities am: 32996ff68f -s ours
am skip reason: skip tag Change-Id I107c329d4d7130d488772166eae8b5e7aaa2ff04 with SHA-1 aacf237c27 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13946362

Change-Id: I6a340c70cddb97cae8db045c93efb840d590dc5c
2021-03-22 18:50:14 +00:00
Chiachang Wang
0cba971a19 [automerger skipped] Replace the usage of UidRange am: 545aafdd16 -s ours
am skip reason: skip tag Change-Id I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9 with SHA-1 4956b3225d is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13946361

Change-Id: I8baf4176730743ea317fda6aaff56a5a59b55986
2021-03-22 18:49:58 +00:00
lucaslin
974644dd3c Have a new method in NetworkAgentConfig.Builder to set allowBypass
Have a new method in NetworkAgentConfig.Builder for Vpn to set
allowBypass.

Bug: 182963397
Test: m
Change-Id: I3f244464438325ee7f8a1b953d3fb28186293628
2021-03-22 18:44:48 +00:00
Chiachang Wang
0ffaec3d50 Expose uids related APIs in NetworkRequest and NetworkCapabilities
NetworkRequest is moving into the incoming connectivity mainline
module. The hidden setUids becomes inaccessible outside the
module. Shims for support cts in different API levels will need
to use it to verify the behavior of NetworkRequest. Thus, expose
it to the API surface.

Also, VPN uses getUids and setUids to control network
capabilities. Networkcapabilities is a part of incoming
connectivity mainline module but VPN is not. Thus, exposing these
two methods are needed to allow VPN to continue using it.

Test: make update-api
Bug: 172183305
Merged-In: I107c329d4d7130d488772166eae8b5e7aaa2ff04
Merged-In: If76877e6bde7abe3b5ddde078f87eefd027e675c
Change-Id: If76877e6bde7abe3b5ddde078f87eefd027e675c
2021-03-23 01:34:54 +09:00
Chiachang Wang
32996ff68f Expose uids related APIs in NetworkRequest and NetworkCapabilities
NetworkRequest is moving into the incoming connectivity mainline
module. The hidden setUids becomes inaccessible outside the
module. Shims for support cts in different API levels will need
to use it to verify the behavior of NetworkRequest. Thus, expose
it to the API surface.

Also, VPN uses getUids and setUids to control network
capabilities. Networkcapabilities is a part of incoming
connectivity mainline module but VPN is not. Thus, exposing these
two methods are needed to allow VPN to continue using it.

Test: make update-api
Bug: 172183305
Merged-In: I107c329d4d7130d488772166eae8b5e7aaa2ff04
Change-Id: If76877e6bde7abe3b5ddde078f87eefd027e675c
2021-03-23 01:33:16 +09:00
Chiachang Wang
14a86c3cbd Replace the usage of UidRange
UidRange is used in a shared way between ConnectivityService
and VPN through the use of NetworkCapabilities. UidRange will
be part of the ConnectivityService mainline but Vpn.java will
stay in the framework. We need a way to replace the APIs using
UidRange, or to make UidRange system API. The only really
relevant surface here is NetworkCapabilities#{setUids, getUids}.
The need for UidRange could be replaced by an integer Range, so
replace the usage of UidRange by a integer Range in
NetworkCapabilities#{setUids, getUids} and update the relevant
callers.

Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Merged-In: I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9
Merged-In: Idb7f353788c5779a4fbbd107595e9326b99fe0a8
Change-Id: Idb7f353788c5779a4fbbd107595e9326b99fe0a8
2021-03-23 01:11:20 +09:00
Chiachang Wang
545aafdd16 Replace the usage of UidRange
UidRange is used in a shared way between ConnectivityService
and VPN through the use of NetworkCapabilities. UidRange will
be part of the ConnectivityService mainline but Vpn.java will
stay in the framework. We need a way to replace the APIs using
UidRange, or to make UidRange system API. The only really
relevant surface here is NetworkCapabilities#{setUids, getUids}.
The need for UidRange could be replaced by an integer Range, so
replace the usage of UidRange by a integer Range in
NetworkCapabilities#{setUids, getUids} and update the relevant
callers.

Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Merged-In: I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9
Change-Id: Idb7f353788c5779a4fbbd107595e9326b99fe0a8
2021-03-23 01:02:00 +09:00
Aaron Huang
f0fc6d7f68 Move deduceRestrictedCapability to libs/net and rename it
NetworkCapabilities is included in framework-connectivity, so external
module cannot have dependencies on its hidden API. Move the method to
libs/net so that external modules can use it by including the library.

Bug: 178777253
Test: FrameworksNetTests
Change-Id: I77970b3a5e5e0e9d263639694b1f06519169bf64
2021-03-22 22:35:10 +08:00
Chiachang Wang
577911cc62 Merge "Add NetworkRequest.Builder creating from an existing instance" into sc-dev 2021-03-22 13:17:43 +00:00
Chiachang Wang
7625498617 Add NetworkRequest.Builder creating from an existing instance
Provide a formal way to construct a new NetworkRequest from an
existing instance. The network capabilities inside the
NetworkRequest is hidden. There is no way to pass a
NetworkRequest and update its capabilities. Add
NetworkRequest.Builder creating from an existing instance to
allow to clone the network capabilities.

Bug: 172183305
Test: make update-api
Change-Id: I068462b2a1410daf67b0c95f2b643d396f079531
CTS-Coverage-Bug: 172183305
2021-03-22 13:05:10 +00:00
Remi NGUYEN VAN
c0ab9cc5e4 [automerger skipped] Merge "Remove Preconditions usage in TestNetworkSpecifier" am: 83407b9b0c am: 6863fbab73 am: 7a966d4355 -s ours
am skip reason: skip tag Change-Id I3f722075fb9c74e12e40348ba4faad2f0fa67178 with SHA-1 bcd9def075 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644991

Change-Id: I26d0bb14c35b17086f66a4dfc6d7f727d9940cf2
2021-03-22 12:32:55 +00:00
Remi NGUYEN VAN
7e7eea6941 [automerger skipped] Merge "Revert "Revert "Remove connectivity dependency on Preconditions""" am: ed231fdfeb am: f689c29d0f am: 018b3a1b3b -s ours
am skip reason: skip tag Change-Id I3a67d266b32142c034520acbcdc30f7213db5e13 with SHA-1 1818dbb99a is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635319

Change-Id: I2d568af3f71ae143c535090487b0b85754421fa6
2021-03-22 12:32:34 +00:00
Remi NGUYEN VAN
4157b47f5d Merge "Add TEST_MAPPING for Connectivity" am: 47ea973cae am: 7853ddc034 am: 9098dddd79
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646851

Change-Id: Iab1ad1723dd4cb4d4652b23d8499c0b05deca7ad
2021-03-22 12:32:08 +00:00
Treehugger Robot
80d92cb03c Merge "Move trimV4AddrZeros to libs/net" am: 22cb7841a5 am: bc1c1bc38e am: 7fd39d2852
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1636022

Change-Id: I7908772ff2f3b2c5fc1dd9a3510fce0f7ee78ba5
2021-03-22 12:31:39 +00:00
Remi NGUYEN VAN
39a9de44ef Merge "Add SystemMessages protos to Connectivity" am: 470e9e0e19 am: 5cf377d2a3 am: 898073e357
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626204

Change-Id: Ia8a06a0d6f5dcdbdc672149ff206aada83478f23
2021-03-22 12:31:07 +00:00
Jayachandran Chinnakkannu
687d2a3118 Merge "Swap parameters in QosCallback#registerQosCallback" am: dcc2fb2a19 am: 507df2663e am: 2e744846a0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628901

Change-Id: Ice84bb2e6d855ed88e7e432cf49739e69c9e01de
2021-03-22 12:30:40 +00:00
Roshan Pius
3150cd0249 [automerger skipped] resolve merge conflicts of 454f122745 to stage-aosp-master am: 122fc06389 am: efd2d89db8 -s ours
am skip reason: skip tag Change-Id Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3 with SHA-1 1e97e45498 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13944446

Change-Id: I945ee90092cf1f8001a92b72a66373d92fbcd326
2021-03-22 12:28:37 +00:00
Chiachang Wang
9e264c0d3c [automerger skipped] Revert "Revert "Expose uids related APIs in NetworkRequest and N..." am: 628cb1187e -s ours am: c2b19b07ee -s ours am: 881130bd85 -s ours
am skip reason: skip tag Change-Id I107c329d4d7130d488772166eae8b5e7aaa2ff04 with SHA-1 aacf237c27 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646848

Change-Id: I9986ddce8827a85982b0846e18044fc45ec95c24
2021-03-22 12:28:01 +00:00
Lorenzo Colitti
84e5ff14e6 [automerger skipped] Merge changes from topic "backport-connectivityresources" am: 2cff13b0fc am: 2752f7f4b1 am: cec8be5ba4 -s ours
am skip reason: skip tag Change-Id Ic0d24d36af0b87153d527083f8964ddc6cd78482 with SHA-1 a338d5aa58 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645297

Change-Id: Ie24e96154851ddeac6971e4bfa49a0eb43e5915c
2021-03-22 12:27:31 +00:00
Remi NGUYEN VAN
962f78e3fe [automerger skipped] Add connectivity protos to framework-connectivity am: f96b26606a am: 5b8376a888 am: 3efdf7d59d -s ours
am skip reason: skip tag Change-Id I2c4a37ff2ee9e8efde49885feeafa27dcff7ca2c with SHA-1 8c2d521b8d is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635040

Change-Id: I593f9d014d29a8041c9acbe1f3034f15613c88b5
2021-03-22 12:27:12 +00:00
Remi NGUYEN VAN
c314efd04e [automerger skipped] Move connectivity AIDLs to android.net am: 43dea2835e am: 5814872f7e am: abfe20b16d -s ours
am skip reason: skip tag Change-Id I611f1941698c574e37aea912ee76dadc8b32e41a with SHA-1 60ad218d72 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596272

Change-Id: Ice5060b366cfb6cbce6e6151f2fb1a1208e9b939
2021-03-22 12:26:41 +00:00
Remi NGUYEN VAN
c8d95044c0 [automerger skipped] Migrate framework-connectivity internal resources am: 5245c4c0f0 am: a5e5949870 am: 842b3e6a57 -s ours
am skip reason: skip tag Change-Id I77a3efca2cd644f9828db1ed5d3cae8070fb8363 with SHA-1 749a39a431 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641905

Change-Id: I17ffd47283c43a6df1e61ca9ef864ca32d99e4e9
2021-03-22 12:26:31 +00:00
Remi NGUYEN VAN
e26b3af678 [automerger skipped] Add multipath preference, background status API am: e62e7ff645 am: 82f56fccb8 am: ff56893947 -s ours
am skip reason: skip tag Change-Id I8a03162b2f6691086bb64e75ffd354cdfca7f86a with SHA-1 1fdeb50d9a is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644388

Change-Id: I147c04bb30ed920679d88cd765b7517ca4fbd12e
2021-03-22 12:26:13 +00:00
junyulai
e76b5f7004 [VCN15] expose addUnwantedCapability and related APIs
Test: m -j doc-comment-check-docs
Bug: 175662146
Change-Id: I3f2e6a99e015f09cc4405f6804eac4ae33e3dcc7
2021-03-22 11:11:26 +00:00
Lorenzo Colitti
82c0fab0f0 [automerger skipped] Merge "Copy NetworkNotificationManager resources to conectivity module." am: 6d5c278d15 am: 1914eecf5c am: 4b623b3194 -s ours
am skip reason: skip tag Change-Id I99c0d28069dd1a13d452105b0a83a03a833232a2 with SHA-1 cd2bf4959f is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644996

Change-Id: I97d82338363702be56963839a241e1d72c1e9c86
2021-03-22 11:00:35 +00:00
Remi NGUYEN VAN
411f6477c6 Merge "Add NetworkFactory to connectivity jarjar rules" into sc-dev 2021-03-22 09:27:06 +00:00
Lucas Lin
fb570e771a Merge "Expose some APIs from ConnectivityManager" into sc-dev 2021-03-22 06:44:49 +00:00