Commit Graph

498 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
6d208315f8 Merge "Add TEST_NETWORK_SERVICE to module API" am: 7e26e33269
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1629260

Change-Id: I78e28855dce5b38785ec60bf1c5489ebf2b98ded
2021-03-19 03:07:53 +00:00
Remi NGUYEN VAN
7e26e33269 Merge "Add TEST_NETWORK_SERVICE to module API" 2021-03-19 02:32:00 +00:00
Remi NGUYEN VAN
2bf4c58ceb Add TEST_NETWORK_SERVICE to module API
TestNetworkManager is being unbundled; the TEST_NETWORK_SERVICE constant
is necessary for the module to register the manager with
registerContextAwareService.

Bug: 171540887
Test: m
Change-Id: I0690251ddfcdaa8a34830e110b75869a370de389
Merged-In: I0690251ddfcdaa8a34830e110b75869a370de389
2021-03-19 00:04:24 +00:00
Kai Shi
855075a2c2 Merge "Add the LCE system API" am: 26ba4d0d09
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1643471

Change-Id: I43c9fded561263a22231a68e39a4a1e6356805c5
2021-03-18 22:20:31 +00:00
Kai Shi
26ba4d0d09 Merge "Add the LCE system API" 2021-03-18 21:23:34 +00:00
Benedict Wong
ead4d8c3b4 Merge "Hide required underlying caps APIs" am: d4b7104f7b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1634485

Change-Id: I46abe41479e04688a45e72de5ce4d77882057ef1
2021-03-18 17:15:50 +00:00
Benedict Wong
d4b7104f7b Merge "Hide required underlying caps APIs" 2021-03-18 17:05:37 +00:00
Anthony Stange
677f4420b9 Merge "Revert "Add an API to listen for changes in network blocked status of an uid."" 2021-03-18 16:52:08 +00:00
Anthony Stange
8623f2b3ca Revert "Add an API to listen for changes in network blocked status of an uid."
This reverts commit 7dc302d612.

Reason for revert: Breaking build - b/183106805
Bug: 183106805
Merged-In: Ib9949b8619c6b148f73630b314c4113d76c31ec1
Change-Id: I9789ed81e630f49c71034b6917188983bd11d774
2021-03-18 16:51:22 +00:00
Sudheer Shanka
5497657433 Merge "Add an API to listen for changes in network blocked status of an uid." 2021-03-18 15:29:17 +00:00
Sudheer Shanka
7dc302d612 Add an API to listen for changes in network blocked status of an uid.
Given that ConnectivityService is moving to a mainline module, we need
a @SystemApi for it to listen for changes in blocked status of an uid.
So, we decided to create a new API for this which can provide
ConnectivityService with more info about why an uid is blocked (which
will be useful for adding a new similar onBlockedStatusChanged callback
in CM.NetworkCallback) and also captures data saver restriction without
having out to track it separately.

Currently, NPMS does some redundant computations because we are
calculating both uid rules and blocked reasons separately. In a
follow-up change, we will compute uid rules using blocked reasons
and later possibly remove that onUidRulesChanged callback.

Bug: 176289731
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest ./tests/net/java/com/android/server/ConnectivityServiceTest.java
Test: atest ./services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Change-Id: Ib9949b8619c6b148f73630b314c4113d76c31ec1
Merged-In: Ib9949b8619c6b148f73630b314c4113d76c31ec1
2021-03-18 10:42:25 +00:00
Lorenzo Colitti
4763300fab Add a VpnManager.TYPE_VPN_OEM.
This needed for OEMs that have VPN types not supported by AOSP.

Bug: 171872481
Test: new test coverage in VpnTransportInfoTest
Change-Id: Ic7529bef7f12d2c74a3be5b1a4a2d54fb0d0bfac
2021-03-18 05:54:53 +00:00
Kai Shi
857391f361 Add the LCE system API
Add the link capacity estimate system API.
Remove the system API of getCarrierBandwidth() and CarrierBandwidth as
they are replaced by the new LCE system API in PhoneStateListener.

Bug: 180434672
Bug: 176814680
Test: manual test of the new LCE system API in LinkBandwidthEstimator
Test: atest -c PhoneStateListenerTest

Merged-In: I5899acf02006a164e31f9b82aeaa7974dd6d2869
Change-Id: I5899acf02006a164e31f9b82aeaa7974dd6d2869
2021-03-17 18:56:11 -07:00
Benedict Wong
226af1dbfd Hide required underlying caps APIs
VCN underlying network capabilities should be transport-dependent in
order to allow using anything other than the INTERNET capability for
VCN types that support wifi offload. Specifically, if underlying
network capabilities are not transport-dependent, and Wifi only ever
supports the INTERNET capability, the VCN is unable to utilize wifi
offload together with requiring NET_CAPABILITY_IMS or
NET_CAPABILITY_CBS, since the IMS or CBS capability would be required
for both cellular and wifi underlying networks.

Until such time as a per-transport capability set is allowed, hide
the exposedCapability pieces, and document that all underlying networks
MUST have INTERNET capability in order to be used.

Bug: 182219992
Test: atest FrameworksVcnTests
Test: atest CtsVcnTestCases
Change-Id: I50d7f1be42e0e001f1413a3d5fe8aa4b7afec223
2021-03-17 10:26:21 -07:00
lucaslin
e4ea3d4c84 Expose VPN_UID
ConnectivityService will be a part of mainline module, so it
cannot access hidden API. Expose VPN_UID for ConnectivityService
to access.

Bug: 170598012
Test: m
Change-Id: I9f74fb97ba27e5feacf1820cf75e28ad73516d7d
2021-03-17 19:04:01 +08:00
Zoey Chen
dd68ace7e0 Merge "[Telephony] Exposed PhysicalChannelConfigListener as public API instead of system" 2021-03-17 06:46:27 +00:00
Chalard Jean
db9e849986 Merge "Annotate NSM heavy methods with @WorkerThread" 2021-03-17 02:03:22 +00:00
Hall Liu
2ab1cc0fac Merge "Add carrier config keys for RTT-VT compat" 2021-03-16 23:21:34 +00:00
Hall Liu
f4eae0f0e3 Add carrier config keys for RTT-VT compat
Some carriers don't allow downgraded RTT calls to be upgraded to VT or
vice versa. Add carrier config keys to capture this behavior.

Bug: 175659924
Test: NA
Change-Id: I03916e1fab9abe58733c06f351b6846ddc29f337
2021-03-15 16:06:48 -07:00
Aaron Huang
16f50075b1 Merge changes from topic "pacproxy-service"
* changes:
  Make PacProxyService be a system service
  Revert^2 "Refactor setCurrentProxyScriptUrl to a void method"
2021-03-15 11:49:45 +00:00
Aaron Huang
5d31a15d84 Make PacProxyService be a system service
PacProxyInstaller class is running a thread all the time and is
listening to intent ACTION_PAC_REFRESH so it would be better to
make it be a system service with a manager class PacProxyManager
which is obtained with getSystemService(PacProxyManager.class).
Besides, rename PacProxyInstaller to PacProxyService will
be easier to know it's the service for PacProxyManager.

ConnectivityService is going to be a mainline module and it
needs constructor of PacProxyService to be SystemApi.
However, in current design, it needs to pass a handler and
an int arguments to the constructor which would be difficult
to maintain if just expose the constructor directly.

So, define a listener for the event that the current PAC
proxy has been installed so that the handler and the int
arguments can be removed from the constructor.

Bug: 177035719
Test: FrameworksNetTests
Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
2021-03-15 14:40:58 +08:00
Sooraj Sasindran
58489d1d48 Merge "Allow REQUEST_NOT_SUPPORTED for nr dual connectivity config" 2021-03-15 04:38:24 +00:00
Treehugger Robot
17cc39f7d8 Merge changes from topic "uwb_api_change"
* changes:
  Pass SessionHandle to UWB Service when opening a session
  Return CancellationSignal when opening UWB session
  Address UWB API feedback
2021-03-12 21:50:17 +00:00
Sooraj Sasindran
d3b3e00a05 Allow REQUEST_NOT_SUPPORTED for nr dual connectivity config
Allow REQUEST_NOT_SUPPORTED for nr dual connectivity configuration
and query

Bug: 181648176
Test: CTS with presubmit
Change-Id: Ib10dcc083d9aae7b905aa008dff05d2975865c71
2021-03-12 13:43:21 -08:00
Cody Kesting
a93e2f9545 Merge "Update Policy Listener API naming." 2021-03-12 21:32:08 +00:00
Brad Ebinger
3db11be5d7 Merge "Add a new Config to map PIDF service-description to IMS Feature Tags" 2021-03-12 19:30:30 +00:00
Hui Wang
f395f2dd4b Merge "Add onPreProvisioningRecevied to RcsProvisioningCallback" 2021-03-12 18:22:52 +00:00
Zoey Chen
943a0c590b [Telephony] Exposed PhysicalChannelConfigListener as public API instead of system
Bug: 182408018
Test: make
Change-Id: I294453b0c28b79e309063a1cd2f57644b3a6242c
2021-03-12 15:54:29 +08:00
Paul Hu
240fdc5d97 Merge "Expose Intent#ACTION_CLEAR_DNS_CACHE" 2021-03-12 07:47:10 +00:00
paulhu
97c860113a Expose Intent#ACTION_CLEAR_DNS_CACHE
DnsManager will broadcast ACTION_CLEAR_DNS_CACHE intent to clear
dns cache when network have changed. But DnsManager is in the
Connectivity mainline module which can not use non-formal API.
Thus, expose Intent#ACTION_CLEAR_DNS_CACHE as module lib API for
mainline module.

Bug: 182370679
Test: m update-api
Merged-In: I30b1b146dcae82926be7bdb8b343635a01eabefe

Change-Id: I30b1b146dcae82926be7bdb8b343635a01eabefe
2021-03-12 05:21:08 +00:00
Remi NGUYEN VAN
cb35ed09da Merge "Move ParseException to Connectivity" 2021-03-12 04:27:55 +00:00
Hui Wang
caf97c72f5 Add onPreProvisioningRecevied to RcsProvisioningCallback
This is to support Verizon ACS self provisioning requirement.

Bug: 182309219
Test: atest CtsTelephonyTestCases:android.telephony.ims.cts.ImsServiceTest
Change-Id: I2d41717fbff909a86b11f040eca22e8a49bf9a28
2021-03-12 00:15:27 +00:00
Remi NGUYEN VAN
c77293b7a9 Merge changes from topic "ethernet_specifier"
* changes:
  Fix common tests on Q and R
  Add Ethernet, TestNetworkSpecifier API
2021-03-11 23:51:49 +00:00
Grace Jia
0251d617a5 Merge "Annotation and doc improvement for adhoc conference APIs." 2021-03-11 23:07:54 +00:00
Treehugger Robot
5967b657ef Merge "Removed EpsQosSessionAttributes#onCreate" 2021-03-11 22:37:36 +00:00
Tyler Gunn
3b36aa32fa Merge "Mark android.net.sip code as deprecated." 2021-03-11 22:03:11 +00:00
Cody Kesting
ae3c3593cb Update Policy Listener API naming.
This CL changes the policy listener API to be
VcnNetworkPolicyChangeListener (it was previously
VcnNetworkPolicyListener) per API Council guidance.

This CL also requires permission NETWORK_FACTORY for removing registered
policy listeners.

Bug: 181562364
Test: atest FrameworksVcnTests
Change-Id: I026eaefa62d8f64b9180fc182a7cf0605d83bf97
Merged-In: I026eaefa62d8f64b9180fc182a7cf0605d83bf97
(cherry picked from commit a96ec13821)
2021-03-11 09:48:22 -08:00
Remi NGUYEN VAN
c5479a0886 Add Ethernet, TestNetworkSpecifier API
Rename StringNetworkSpecifier to EthernetNetworkSpecifier (its only
production user), and make it module-lib API.
The original StringNetworkSpecifier file is actually kept to satisfy
some invalid dependencies; it will be removed separately.

This allows specifying an Ethernet interface with a non-deprecated API:
until this change the only way to do so would be to use
NetworkRequest#setSpecifier(String), which is deprecated.

Similarly, add the TestNetworkSpecifier API for TestNetworkManager, to
replace previous usage of StringNetworkSpecifier. TestNetworkManager is
module API, so TestNetworkSpecifier should be module API too. This
allows tests to request the test interface specifically, without using
the deprecated NetworkRequest#setSpecifier(String).

Bug: 179329291
Test: m
Merged-In: Iee569f5c8bbdc4bc979610e1191308281f3d4620

Change-Id: Iee569f5c8bbdc4bc979610e1191308281f3d4620
2021-03-11 23:02:02 +08:00
Chalard Jean
ed40025e25 Annotate NSM heavy methods with @WorkerThread
Test: TH
Bug: 181906747
Change-Id: Ia30273466c1b91a3dcc5d36dac61f92185dec96e
2021-03-11 10:47:46 +00:00
Remi NGUYEN VAN
ebacbf75b4 Move ParseException to Connectivity
ParseException is a public API class used to support Connectivity APIs,
so it should be in the same API surface as connectivity.

Bug: 181512874
Test: m
Change-Id: Ie1213de0d0facc8f409f7b4c2553abb382e4afbf
2021-03-11 17:19:18 +09:00
James Lin
6c165b2da9 Merge "Update the RCS UCE APIs." 2021-03-11 06:28:00 +00:00
Lucas Lin
d2b8d781f8 Merge "Expose TYPE_VPN_* constants" 2021-03-11 01:30:02 +00:00
Sooraj Sasindran
2f85c69c74 Merge "Update documentation according API review" 2021-03-10 23:13:15 +00:00
Brian Stack
23d41b8f0f Return CancellationSignal when opening UWB session
Returns a CancellationSignal instead of an AutoCloseable when calling
UwbManager#openRangingSession per API feedback.

Bug: 180396069
Test: atest UwbManagerTests CtsUwbTestCases
Change-Id: I74482c56d1a3686b570c90e7d3c11e45ec2f0adc
Merged-In: I74482c56d1a3686b570c90e7d3c11e45ec2f0adc
2021-03-10 12:10:11 -08:00
Brian Stack
78bce9af5b Address UWB API feedback
Update AngleOfArrivalMeasurement and AngleMeasurement to address
feedback received on API surface.

Bug: 180395817
Test: atest UwbManagerTests CtsUwbTestCases
Change-Id: Iec572ed9df22440a5b068d9e7fbf73026970d5d3
Merged-In: Iec572ed9df22440a5b068d9e7fbf73026970d5d3
2021-03-10 12:10:04 -08:00
Daniel Bright
58100f4d4c Removed EpsQosSessionAttributes#onCreate
* The method EpsQosSessionAttributes#onCreate was not being used

Bug: 181562173
Test: m
Change-Id: I4321961f41c18f0abe6c5e837fe3c4a41beb63b7
2021-03-10 11:39:59 -08:00
Hall Liu
53252b14e5 Merge "Add onBindClient for testing" 2021-03-10 19:24:43 +00:00
Sooraj Sasindran
60310d719e Update documentation according API review
Bug: 174580495, 174580077
Change-Id: I2791eb1351057a55caa99e9e1b95d26a31d708f2
Test: build
2021-03-10 15:15:19 +00:00
lucaslin
62b2252831 Expose TYPE_VPN_* constants
Expose TYPE_VPN_* constants so that connectivity mainline module
can access them.

Bug: 172183305
Test: atest FrameworksNetTests
Change-Id: Ic8d46a392f3deda5983c52b43585707fa2c98f57
2021-03-10 16:57:57 +08:00
Hall Liu
eb7c9eaf16 Add onBindClient for testing
Add an overrideable method in ConnectionService that gets called when
telecom binds, since onBind is final and it's unsafe to make not-final.

Bug: 181057509
Test: atest CtsTelecomTestCases
Change-Id: I80088185402789fec499b8659ca8b74bcec05748
2021-03-09 20:29:40 -08:00