Commit Graph

424 Commits

Author SHA1 Message Date
Lorenzo Colitti
52396dad7e Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass" am: 14f7c0273f am: 07a92ecbd9 am: 702f7447ff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649288

Change-Id: Ibc6553b1471ee8e0ab362979ba9525c2e328a275
2021-03-23 14:02:47 +00:00
Lorenzo Colitti
915460fff3 Merge changes I638ed5cd,I29f15571,I21a22ed1 am: 892589c514 am: 3df38d48ae am: 114c3e3038
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1648068

Change-Id: I6d897cdcfb5b0e4809a32312071eb77623754f94
2021-03-23 14:01:19 +00:00
Aaron Huang
720ebdc401 Merge "Remove Network, NetworkRequest metrics from jobscheduler" into sc-dev 2021-03-23 13:22:32 +00:00
Aaron Huang
68d118e3c6 Merge "Move deduceRestrictedCapability to libs/net and rename it" into sc-dev 2021-03-23 12:50:40 +00:00
TreeHugger Robot
d3a7d7d98d Merge "Expose NetworkAgent constructor taking a NetworkScore parameter" into sc-dev 2021-03-23 12:45:24 +00:00
Lucas Lin
6c5499ecc6 Merge "Expose NetworkScore to external caller" into sc-dev 2021-03-23 12:18:23 +00:00
Frank Li
f33a205229 Merge "[JS01]Remove hidden API usage of Connectivity Sevice" into sc-dev 2021-03-23 10:22:28 +00:00
Aaron Huang
8aeeb33803 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
17ea6fcab5 Merge "Build service-connectivity with system_server API" into sc-dev 2021-03-23 09:18:53 +00:00
Chiachang Wang
ae04f625fe 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
b90ff160cc 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
585b50136e Merge "Add NDK API for getprocnetwork" into sc-dev 2021-03-23 07:11:06 +00:00
Remi NGUYEN VAN
5625b1f3c6 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
ebdb0bd277 [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
Lorenzo Colitti
14f7c0273f Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass" 2021-03-23 04:40:50 +00:00
Frank Li
35dc633f46 Merge "[TL02]Remove hidden API usage of NetworkAgent" into sc-dev 2021-03-23 02:03:59 +00:00
lifr
03f6fd2052 [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
892589c514 Merge changes I638ed5cd,I29f15571,I21a22ed1
* changes:
  Expose registerDefaultNetworkCallbackAsUid.
  Support calling registerDefaultNetworkCallback for another UID.
  Store the effective UID in NetworkRequestInfo.
2021-03-23 01:27:58 +00:00
Lorenzo Colitti
a93335981e Merge "[VCN15] expose addUnwantedCapability and related APIs" into sc-dev 2021-03-23 01:19:39 +00:00
Remi NGUYEN VAN
3d50059bbc 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
lucaslin
ff456d0fc0 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-23 09:01:40 +09:00
Joshua Mccloskey
b7b39bd3c7 Revert "Have a new method in NetworkAgentConfig.Builder to set allowBypass"
This reverts commit 0ad175531b.

Reason for revert: Broken build b/183416288

Change-Id: Id9ec9fb98b8f88eeb7db1d1442d76456aaf350d1
2021-03-22 18:55:32 +00:00
lucaslin
0ad175531b 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
Aaron Huang
cb16330091 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
6537da5e2f Merge "Add NetworkRequest.Builder creating from an existing instance" into sc-dev 2021-03-22 13:17:43 +00:00
Chiachang Wang
26ab6df3c8 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
237ff2c570 Merge "Add TEST_MAPPING for Connectivity" am: 2ff7a8e1b3 am: 9329f9fe97 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
b6eba34732 Merge "Move trimV4AddrZeros to libs/net" am: 405801f0fc am: 4e688a6cb7 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
06bca53163 Merge "Add SystemMessages protos to Connectivity" am: 805b39b2d9 am: bd85dbeb41 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
24f9e168ad Merge "Swap parameters in QosCallback#registerQosCallback" am: bc71009366 am: cd9b3e06c2 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
junyulai
7ff635a9a9 [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
ab638c1edc Expose registerDefaultNetworkCallbackAsUid.
Bug: 165835257
Test: atest FrameworksNetTests
Change-Id: I638ed5cd5273d456919630aba1e22f099df1b36c
2021-03-22 19:50:27 +09:00
Remi NGUYEN VAN
15615ed0f2 Merge "Add NetworkFactory to connectivity jarjar rules" into sc-dev 2021-03-22 09:27:06 +00:00
Lorenzo Colitti
a3d14561d5 Support calling registerDefaultNetworkCallback for another UID.
This is to be used by privileged components (e.g., JobScheduler)
to request callbacks about the state of other UIDs on the system.

Bug: 165835257
Test: new unit test coverage
Change-Id: I29f155710394e58c14fcef488db6271d8d83033a
2021-03-22 17:52:20 +09:00
Lucas Lin
22ca359895 Merge "Expose some APIs from ConnectivityManager" into sc-dev 2021-03-22 06:44:49 +00:00
lucaslin
9eae065a2e Expose some APIs from ConnectivityManager
- Expose setRequireVpnForUids to Vpn.java
- Expose setLegacyLockdownVpnEnabled to LockdownVpnTracker.java
- Expose requestRouteToHostAddress to
  GnssNetworkConnectivityHandler.java

Bug: 182963397
Test: m
Change-Id: I1fb5ecfbe37878ba3534e6c6c7599ca29db2735c
2021-03-22 11:51:27 +08:00
Remi NGUYEN VAN
1fa5fc98f7 Add NetworkFactory to connectivity jarjar rules
NetworkFactory is part of net-utils-device-common, but is outside of
the com.android.net.module.util and needs a separate jarjar rule.

Bug: 171540887
Test: atest FrameworksNetTests
Change-Id: Iec828a789175acdbe4e7f35e4cc942922540495c
2021-03-22 03:50:15 +00:00
Remi NGUYEN VAN
9329f9fe97 Merge "Add TEST_MAPPING for Connectivity" am: 2ff7a8e1b3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646851

Change-Id: I829c839620849e3a49be0f2629157f4adb9a1dcb
2021-03-22 03:26:46 +00:00
Treehugger Robot
4e688a6cb7 Merge "Move trimV4AddrZeros to libs/net" am: 405801f0fc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1636022

Change-Id: Ifbad5630a39f8990479a5f20e018a3a499334fe1
2021-03-22 03:23:48 +00:00
Remi NGUYEN VAN
bd85dbeb41 Merge "Add SystemMessages protos to Connectivity" am: 805b39b2d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626204

Change-Id: I8648b09a97485dcecac2e5075d605e79a730ec3f
2021-03-22 03:20:45 +00:00
Jayachandran Chinnakkannu
cd9b3e06c2 Merge "Swap parameters in QosCallback#registerQosCallback" am: bc71009366
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628901

Change-Id: I2c371b6f1dc25f84a389480e46d9d582e9da148b
2021-03-22 03:18:17 +00:00
Lorenzo Colitti
9997912ba9 Merge "Use connectivity resources in service-connectivity" into sc-dev 2021-03-22 02:21:13 +00:00
Remi NGUYEN VAN
1077770f78 Merge "Remove Preconditions usage in TestNetworkSpecifier" 2021-03-22 01:40:44 +00:00
Remi NGUYEN VAN
9cb39acfef Merge "Revert "Revert "Remove connectivity dependency on Preconditions""" 2021-03-22 01:40:28 +00:00
Remi NGUYEN VAN
2ff7a8e1b3 Merge "Add TEST_MAPPING for Connectivity" 2021-03-22 01:39:51 +00:00
Treehugger Robot
405801f0fc Merge "Move trimV4AddrZeros to libs/net" 2021-03-22 01:37:06 +00:00
Remi NGUYEN VAN
906cde3fde Merge "Use jniThrowErrnoException from JNIHelp" into sc-dev 2021-03-22 00:20:36 +00:00
Remi NGUYEN VAN
335a968b65 Remove Preconditions usage in TestNetworkSpecifier
Preconditions is a hidden API utility. It can be easily replace by
inline checks.

Bug: 177046265
Test: m
Change-Id: I3f722075fb9c74e12e40348ba4faad2f0fa67178
Merged-In: I3f722075fb9c74e12e40348ba4faad2f0fa67178
2021-03-22 00:02:10 +00:00
Remi NGUYEN VAN
496d5dca27 Revert "Revert "Remove connectivity dependency on Preconditions""
Preconditions.checkNotNull is deprecated to be replaced by
Objects.requireNonNull, and other methods can easily be replaced by
inline checks.

Preconditions is an internal API class that should not be used by
unbundled jars.

Bug: 177046265
Change-Id: I3a67d266b32142c034520acbcdc30f7213db5e13
Merged-In: I3a67d266b32142c034520acbcdc30f7213db5e13
Test: m
2021-03-22 00:01:43 +00:00
Remi NGUYEN VAN
805b39b2d9 Merge "Add SystemMessages protos to Connectivity" 2021-03-21 23:58:00 +00:00