Commit Graph

43445 Commits

Author SHA1 Message Date
Treehugger Robot
42fb8d0703 Merge "Dexopt service-connectivity." 2021-12-22 13:10:21 +00:00
Jack Yu
04bbc5b9b0 Added a new network capability MMTEL
Added NET_CAPABILITY_MMTEL to indicate a network
support MMTEL (Multimedia telephony). This is for
IMS service to request an IMS network that supports
voice or PS (VoPS for 4G, VoNR for 5G).

This was previously submitted as aosp/1927841, but
which got reverted due to breaking the mainline
build, which uses the pre-built module.

Bug: 210774375
Test: atest ConnectivityServiceTest
Change-Id: If8b691ff4999a4dbf54e7567d9ca74d743dc5ded
2021-12-21 16:31:30 +00:00
Treehugger Robot
05e12e6f79 Merge "[MS12.2] Add unit test for NetworkTemplate builder" 2021-12-21 15:09:43 +00:00
Jean Chalard
01aa602a3f Merge "Improve error reporting in ConnDiags tests" 2021-12-21 12:48:16 +00:00
Martijn Coenen
e5b150a3cd Merge "Revert "Added a new network capability MMTEL"" 2021-12-21 11:27:16 +00:00
Martijn Coenen
6ebc8ba595 Revert "Added a new network capability MMTEL"
Revert "Added setup/tear down data support"

Revert "Added a new network capability MMTEL"

Revert submission 1927643-mmtel_capability

Reason for revert: b/211586152
Reverted Changes:
Ifea8b1e40:Added a new network capability MMTEL
I38655bef2:Added a new network capability MMTEL
I837606d9e:Added setup/tear down data support
I2c7b291fe:Added a new network capability MMTEL

Change-Id: Ie9b0b0d9017ef8aea7fbb56dda522e7c433144b9
2021-12-21 11:24:01 +00:00
Treehugger Robot
95d180b5bf Merge "Added a new network capability MMTEL" 2021-12-21 10:42:37 +00:00
Jiakai Zhang
86c139aedb Dexopt service-connectivity.
`service-connectivity` is a jar that system_server loads dynamically.
Such jars can be dexopted now. This CL adds `service-connectivity` to a
`systemserverclasspath_fragment`, which does not actually add the jar to
the classpath, but tells the build system to dexopt it.

NOTE: The corresponding `exported_systemserverclasspath_fragments` needs
to be added to the `prebuilt_apex` once a new prebuilt is dropped.

Bug: 203198541
Test: m com.android.tethering
Change-Id: I53745baaf1bc7142cc12a1e6cd8d84c9b338ac9d
Merged-In: I53745baaf1bc7142cc12a1e6cd8d84c9b338ac9d
Merged-In: I9a009493fe0482967ab1f92516514715cfd457d6
2021-12-21 09:36:33 +00:00
Junyu Lai
00a8897e98 [MS12.2] Add unit test for NetworkTemplate builder
Test: atest NetworkTemplateTest
Bug: 204830222
Change-Id: Ie83cd4322418449980bece7e13d68f2cacbaf1ef
2021-12-21 03:26:04 +00:00
Junyu Lai
c6f89d4832 Merge "[MS10.2] Move multiplySafeByRational to NetworkStatsUtils" 2021-12-21 01:22:14 +00:00
Chalard Jean
5b2f852fcf Improve error reporting in ConnDiags tests
If an exception is thrown before the callback is registered,
the finally{} block will fail with an exception explaining
the callback can't be unregistered. This masks the actual
exception.

This will ensure the original exception is printed instead.

Test: ConnectivityDiagnosticsManagerTest
Change-Id: I38aba86ff6d5d2a2a8a27c389feffd3aab788774
2021-12-20 22:40:18 +09:00
Junyu Lai
b3e62b8d1d [MS10.2] Move multiplySafeByRational to NetworkStatsUtils
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.NetworkStatsUtilsTest
Bug: 204830222
Change-Id: Ib2464bd7607c7ef35fed780fccbc745b565a908c
2021-12-20 09:10:50 +00:00
Treehugger Robot
e44ea016e1 Merge "Rename libbpf to libbpf_bcc" 2021-12-17 00:37:05 +00:00
Jack Yu
f322d4f5e0 Added a new network capability MMTEL
Added NET_CAPABILITY_MMTEL to indicate a network
support MMTEL (Multimedia telephony). This is for
IMS service to request an IMS network that supports
voice or PS (VoPS for 4G, VoNR for 5G).

Bug: 210774375
Test: atest ConnectivityServiceTest
Change-Id: Ifea8b1e40f65c610e925a27be873930fee2df693
2021-12-16 14:38:10 -08:00
Treehugger Robot
a0d5980011 Merge "Genericize NC#hasSameUids" 2021-12-16 15:37:06 +00:00
Ayush Sharma
e89170bcb1 Merge changes from topic "revert-1551943-vpn-impl-FKOLCXTDDT"
* changes:
  Revert "Unhide RouteInfo#getType and related fields"
  Revert "Unhide IpPrefix(InetAddress, int)"
  Revert "Add CTS tests for exclude VPN routes APIs"
2021-12-16 15:01:30 +00:00
Ayush Sharma
6d1ea2bb16 Revert "Unhide RouteInfo#getType and related fields"
Revert "Add APIs that allow to exclude routes from VPN"

Revert "Suppress NewApi warnings for @SystemApi -> public APIs"

Revert "Add VpnServiceBuilderShim for VpnService.Builder"

Revert submission 1551943-vpn-impl

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN

Change-Id: I98d3b998e4702f56e9d5e17944238b283b29f2b2
BUG: 210979001
2021-12-16 14:40:13 +00:00
Ayush Sharma
758ead6dd3 Revert "Unhide IpPrefix(InetAddress, int)"
Revert "Add APIs that allow to exclude routes from VPN"

Revert "Suppress NewApi warnings for @SystemApi -> public APIs"

Revert "Add VpnServiceBuilderShim for VpnService.Builder"

Revert submission 1551943-vpn-impl

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN

Change-Id: Id0c373fb042a98c1c68807acf7fcfe456520ebe2
BUG: 210979001
2021-12-16 14:40:13 +00:00
Ayush Sharma
f4882153ed Revert "Add CTS tests for exclude VPN routes APIs"
Revert "Add APIs that allow to exclude routes from VPN"

Revert "Suppress NewApi warnings for @SystemApi -> public APIs"

Revert "Add VpnServiceBuilderShim for VpnService.Builder"

Revert submission 1551943-vpn-impl

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN

Change-Id: Ic4f86f405c395f1356de1a6f8cf9e92692d953ce
BUG: 210979001
2021-12-16 14:40:13 +00:00
Chalard Jean
f4802fa4c2 Genericize NC#hasSameUids
This will be used by another set of UIDs in a future patch

Test: FrameworksNetTests
Change-Id: I2c5d18ef93e73b702723814592ef3f3baf5dfbc4
2021-12-16 23:03:42 +09:00
Aaron Huang
3c1e7398a4 Merge "Add makeDependencies method in IpSecService related tests" 2021-12-16 12:32:41 +00:00
Taras Antoshchuk
8be6ba36dc Merge changes from topic "vpn-impl"
* changes:
  Add CTS tests for exclude VPN routes APIs
  Unhide IpPrefix(InetAddress, int)
  Unhide RouteInfo#getType and related fields
2021-12-16 11:13:33 +00:00
Mark Chien
5c4010e196 Merge "Reuse BluetoothPan object and use it under tethering handler thread" 2021-12-16 08:40:39 +00:00
markchien
1e020903cc Reuse BluetoothPan object and use it under tethering handler thread
1. Instead of create BluetoothPan every time when tethering need to use
it, store it with mBluetoothPan and resue it.
2. Call BluetoothPan function under tethering handler thread.

Bug: 190438212
Test: atest TetheringTests

Change-Id: I40adece59960ec44a02dc438d6bd95483a0788af
2021-12-16 12:12:07 +08:00
Aaron Huang
286c0e5336 Merge "Change to use Dependencies in IpSecService Tests" 2021-12-15 07:53:23 +00:00
Xin Li
93c578c7ca Merge "Merge Android 12 QPR1" 2021-12-14 20:27:32 +00:00
Xin Li
06e662f597 Merge Android 12 QPR1
Bug: 210511427
Merged-In: I4bfb3fc34f10d0c84dafc949f4e7f604d98244e1
Change-Id: I9ff07a2256a709115a3d84370cfcd5fadc34b3a9
2021-12-14 08:39:15 -08:00
Remi NGUYEN VAN
eef1e2033d Merge "Move TestableNetworkAgent to Common Util Location" 2021-12-14 12:49:15 +00:00
Jean Chalard
ec3013ddf4 Merge "Mark arg to NC#appliesToUidRange non-null" 2021-12-14 12:17:27 +00:00
Jean Chalard
5469fa6e59 Merge "Remove NetworkCapabilities#combine*" 2021-12-14 10:47:31 +00:00
Aswin Sankar
5d16f41639 DnsException: run only on T+ versions
- Test was failing on S mainline builds. Fixing forward.

Bug: 210540375
Test: CtsDnsResolverTests.
Change-Id: Ia980965c8ee1b9ddae99f593628f8b7ecfeca394
2021-12-14 02:44:54 +00:00
Taras Antoshchuk
673eb6ecd2 Add CTS tests for exclude VPN routes APIs
Add HostsideVpnTests test cases for different combinations of
included/excluded routes in VPN configuration.

Bug: 186082280
Test: atest HostsideVpnTests
Change-Id: I993a32d4066a851eb0c455aff2f599569e958ba7
2021-12-13 18:47:58 +01:00
Chalard Jean
2873428835 Mark arg to NC#appliesToUidRange non-null
This is always non-null, and if it's not it has a good
chance to throw anyway

Test: m
Change-Id: I1020ab9e6eb546390325cf6aa4d30183b2e69785
2021-12-13 21:55:56 +09:00
Chalard Jean
bdf4f2987d Remove NetworkCapabilities#combine*
This is no longer used outside of tests, and can be safely
removed.

Also this family of methods is fairly confusing, as while
it's well defined for some members, many later additions
had to be written so as to dissallow some combinations when
the workings of this family of methods didn't match the
semantics of some members, making them possibly dangerous
to use and at least exhibit difficult to understand semantics.

Test: FrameworksNetTests
      m
Change-Id: Ia69c20afa16c2153839891f6e33331caa9da33ff
2021-12-13 21:15:34 +09:00
Taras Antoshchuk
a5a1b80222 Unhide IpPrefix(InetAddress, int)
Unhide IpPrefix constructor to allow its usage with the new
VpnService.Builder#excludeRoute(IpPrefix) method.

Bug: 186082280
Test: atest IpPrefixTest
Change-Id: Ie5b62b2b206def1be53a41219681b4a8bc06c1d2
2021-12-13 11:11:00 +01:00
Taras Antoshchuk
62065db8d1 Unhide RouteInfo#getType and related fields
Bug: 186082280
Test: atest RouteInfoTest
Change-Id: I59b9185cf4f8f2afd691b49cf6b4659fe36e6bf8
2021-12-13 11:11:00 +01:00
Treehugger Robot
d109712194 Merge changes from topic "DnsException" am: 0db3016398
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1908042

Change-Id: I4bfb3fc34f10d0c84dafc949f4e7f604d98244e1
2021-12-13 08:04:17 +00:00
Treehugger Robot
0db3016398 Merge changes from topic "DnsException"
* changes:
  CTS DnsResolverTest for DnsException ctor
  DnsResolver: Make DnsException ctor public
2021-12-13 07:48:28 +00:00
Aswin Sankar
7e184fc11e Merge "DnsResolverTest: Use AndroidJUnit4.class" am: 85509fb3e4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1918397

Change-Id: Ifd5f103d5bfa2ea2d0817efff65aaa1a4c60b8a9
2021-12-13 06:49:19 +00:00
Aswin Sankar
85509fb3e4 Merge "DnsResolverTest: Use AndroidJUnit4.class" 2021-12-13 06:28:08 +00:00
Jean Chalard
d2afada37a Merge "Fix an issue where OEM pref tests don't clean up correctly" am: bbb7ae75d1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1906316

Change-Id: Ifed130bc06f0d79f1039f31574b9d2a857564c8e
2021-12-13 02:20:29 +00:00
Jean Chalard
bbb7ae75d1 Merge "Fix an issue where OEM pref tests don't clean up correctly" 2021-12-13 02:06:38 +00:00
Mingguang Xu
9e4d6d2dc6 Add CTS for DhcpOption am: 4df5d1fdd2
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1917689

Change-Id: Ic4a33e417830ff534da1e56895159935b2a85ae9
2021-12-11 01:51:37 +00:00
Mingguang Xu
4df5d1fdd2 Add CTS for DhcpOption
Bug: 177278970

Test: this
Change-Id: Ia9a9384cb39c049253ead8f7eb594505ccf08333
2021-12-10 23:26:36 +00:00
Mingguang Xu
55cbbe7d15 Merge "Create DhcpOption object and make it a SystemApi" am: 0a416b65b1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1875313

Change-Id: Id6c9f9e696a76031041cf55aea6aee6a2ed43b17
2021-12-10 19:58:25 +00:00
Mingguang Xu
0a416b65b1 Merge "Create DhcpOption object and make it a SystemApi" 2021-12-10 19:43:02 +00:00
Aswin Sankar
ca942be00d CTS DnsResolverTest for DnsException ctor
- Adds a CTS test to verify that DnsException
can be subclassed and its constructor re-used.

Test: Adds testDnsExceptionConstructor() CTS test.
Bug: 208479811
Change-Id: Ia1dffe8ad5252b61af5a6ef0f6630f075081a6d1
2021-12-10 19:30:20 +00:00
Aswin Sankar
74cbfd5aab DnsResolver: Make DnsException ctor public
Making the DnsException constructor public is useful for apps
using DnsResolver to write their tests, and for internal packages
that may want to implement the DnsResolver.Callback interface.

Test: for regression; CTS tests in b/208479811
Bug: 208464882
Change-Id: I14641688f53721c96e6df9596a7506912ba3aec0
2021-12-10 19:30:20 +00:00
Aswin Sankar
6ed0167930 DnsResolverTest: Use AndroidJUnit4.class
These CTS tests previously extended AndroidTestCase, which made useful
annotations like 'DevSdkIgnoreRule' not take effect.

Test: CtsNetTestCasesLatestSdk
Bug: 208479811
Change-Id: I79f7e48167bb3bfbd4f6cde33d7e3907c2af6f74
2021-12-10 19:30:15 +00:00
Treehugger Robot
a9656625d2 Merge "[MS07.2] Move NetworkStatsCollection/IdentitySet into frameworks" am: 7577131341
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1895330

Change-Id: I3d84b1a82e07a9b4a56ddc88f3f81d875870517c
2021-12-10 18:57:07 +00:00