Commit Graph

42903 Commits

Author SHA1 Message Date
Treehugger Robot
4fbdc30d3e Merge "Fix a flake in ConnectivityDiagnostics" am: 1ac3e27399 am: 79b4f30495
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1796368

Change-Id: Ie4a7bd523342c93ca426305153ad8cc312346cae
2021-08-16 09:29:59 +00:00
Treehugger Robot
79b4f30495 Merge "Fix a flake in ConnectivityDiagnostics" am: 1ac3e27399
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1796368

Change-Id: If68391d8131cb0d64fe7bfcfdea192fadc24d1cf
2021-08-16 09:12:48 +00:00
Treehugger Robot
1ac3e27399 Merge "Fix a flake in ConnectivityDiagnostics" 2021-08-16 09:01:58 +00:00
Treehugger Robot
770721c281 [automerger skipped] Merge "Remove unused directories in Connectivity" am: 381ea1f1b1 am: 48181ab964 -s ours
am skip reason: Merged-In Ie3a058b904cb2e3704c3a0725c8f720f81bb235e with SHA-1 f9e7c2a543 is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1793470

Change-Id: Icc5c2a37af69449393a7cc7093823c90efb1766c
2021-08-16 07:11:53 +00:00
Chalard Jean
4da146bd2f Fix a flake in ConnectivityDiagnostics
Bug: none
Test: ConnectivityServiceTest
Change-Id: I9242226be976e7c346addcbaf7e2b0154a3829f7
2021-08-16 16:05:06 +09:00
Treehugger Robot
48181ab964 Merge "Remove unused directories in Connectivity" am: 381ea1f1b1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1793470

Change-Id: I2d9d147016b4fc4060a4b04b75a4a00c10876847
2021-08-16 06:57:16 +00:00
Treehugger Robot
381ea1f1b1 Merge "Remove unused directories in Connectivity" 2021-08-16 06:43:07 +00:00
Xin Li
e78344b11f [automerger skipped] Merge stage-aosp-sc-ts-dev before making it an upstream am: b5c6036c29 -s ours
am skip reason: Merged-In I592dd5f1d6e13b020beadb11b9d913857a82e524 with SHA-1 58b493abf6 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15546967

Change-Id: I5cf84442d3e25629cc8c39fa2dd2b01cfebc8b56
2021-08-13 20:51:43 +00:00
Xin Li
b5c6036c29 Merge stage-aosp-sc-ts-dev before making it an upstream
Bug: 169893837
Merged-In: I592dd5f1d6e13b020beadb11b9d913857a82e524
Change-Id: I9db108c5bf31c17321534a55c1e6e78f46b96c45
2021-08-13 18:26:19 +00:00
Xin Li
de12da7a25 Merge "Merge ab/7633965" into stage-aosp-sc-ts-dev 2021-08-13 00:03:19 +00:00
The Android Open Source Project
7ef5d542cd Merge ab/7633965
Bug: 169893837
Merged-In: I592dd5f1d6e13b020beadb11b9d913857a82e524
Change-Id: I4e01d58ed61c595b704bae6c935d0da1714ee398
2021-08-12 22:28:22 +00:00
Benedict Wong
862d5607aa Merge "Prevent NPEs when registering/unregistering ConnDiags CBs." am: 5805d3cfd2 am: 5c5ff18089
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1761210

Change-Id: Ie5209e824f510d7866e74ce61e4b04e4dd8cd84e
2021-08-12 21:01:17 +00:00
Benedict Wong
5c5ff18089 Merge "Prevent NPEs when registering/unregistering ConnDiags CBs." am: 5805d3cfd2
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1761210

Change-Id: I0b39f045a4f0b51b278bf182ce36fbcf9c7fb8ca
2021-08-12 20:46:41 +00:00
Benedict Wong
5805d3cfd2 Merge "Prevent NPEs when registering/unregistering ConnDiags CBs." 2021-08-12 20:35:39 +00:00
markchien
36733a1509 Use SdkLevel util instead of explicitly checking the version am: 932df54493 am: 682e38c9e8
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1793481

Change-Id: I1c467221368f4d19346be59e230a0b3424bb4023
2021-08-12 14:24:14 +00:00
markchien
682e38c9e8 Use SdkLevel util instead of explicitly checking the version am: 932df54493
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1793481

Change-Id: I3e3670e2f4c11901a8d3dbbb31f2b277b255d0b6
2021-08-12 14:07:29 +00:00
markchien
932df54493 Use SdkLevel util instead of explicitly checking the version
There are IpServerTest test case fail because the code check the wrong
code name for T pre-release builds.

Bug: 194812819
Test: atest TetheringTests

Change-Id: I73bf58c60b6e790fe0060b60c023c10f5d8cbfa8
2021-08-12 07:08:34 +00:00
Chiachang Wang
a042b9ad03 Merge "The net cap value should be bit shifted before &ing" am: 43dd35b6fc am: b266811ecf
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1790357

Change-Id: Ib611f1895bc9856adc489a4e5808f5f89d865b16
2021-08-12 05:41:05 +00:00
Chiachang Wang
b266811ecf Merge "The net cap value should be bit shifted before &ing" am: 43dd35b6fc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1790357

Change-Id: I0f62958c27de0e3b87b57012a75cc38c2a3ae692
2021-08-12 05:31:28 +00:00
Chiachang Wang
43dd35b6fc Merge "The net cap value should be bit shifted before &ing" 2021-08-12 05:12:19 +00:00
Remi NGUYEN VAN
06d22ebcb5 [automerger skipped] Merge "Mock connectivity resources in integration tests" am: d21f0426e7 am: 61eb78e1ee -s ours
am skip reason: Merged-In Ic33d897690a8ea84a78c01dc5f2b2e2c473d57df with SHA-1 0a37e72f0c is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1785907

Change-Id: I0c11251fb3ebb154d1382eddd64dd978a5e5a618
2021-08-12 04:41:03 +00:00
Remi NGUYEN VAN
61eb78e1ee Merge "Mock connectivity resources in integration tests" am: d21f0426e7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1785907

Change-Id: I66252bef31ecb412b5e44ff95711ce8eba3e55e8
2021-08-12 04:26:18 +00:00
Remi NGUYEN VAN
d21f0426e7 Merge "Mock connectivity resources in integration tests" 2021-08-12 04:13:57 +00:00
Remi NGUYEN VAN
b2d47200c7 Remove unused directories in Connectivity
The directories were imported by mistake from old git log in the
frameworks/base repository, and are unused.

Bug: 192995539
Test: m
Merged-In: I0d4bd06e79adedbf582d2fed551d9f1bde521fd1
Merged-In: Ie3a058b904cb2e3704c3a0725c8f720f81bb235e
Change-Id: Ic3ed5d6d25fd87b136d9ae359e7444c4b1289744
2021-08-12 10:15:10 +09:00
Chiachang Wang
c07315aa08 The net cap value should be bit shifted before &ing
The check intends to do the bit & operation. The net cap value
should be shifted against the original capabilities.

Also fix the typo in the method name.

Bug: 191918212
Test: atest FrameworksNetTests
Change-Id: I98396b2538f36fe8b29d27a544a2dfb3060bc9c5
2021-08-11 14:55:00 +08:00
Aaron Huang
17bc178920 Merge "Skip wifi stats test if link layer stats is not supported" into sc-dev am: 9ac9c1d575
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15479880

Change-Id: I5a33f959c8ae5a34584f57508f392038e44062e7
2021-08-11 03:51:12 +00:00
Aaron Huang
1b88f69d99 Skip wifi stats test if link layer stats is not supported
Wifi link layer is an optional feature so this test will be
failed on wifi stats check if a device does not support it.
Add a check to know if the  device supports wifi link layer
stats and skip it if it is not supported.

Ignore-AOSP-First: Needs cherry-picks
Bug: 195518957
Test: CtsNetTestCases:BatteryStatsManagerTest
Change-Id: I592dd5f1d6e13b020beadb11b9d913857a82e524
Merged-In: I592dd5f1d6e13b020beadb11b9d913857a82e524
(cherry picked from commit 58b493abf6)
2021-08-11 03:45:29 +00:00
Aaron Huang
9ac9c1d575 Merge "Skip wifi stats test if link layer stats is not supported" into sc-dev 2021-08-11 03:33:53 +00:00
Aaron Huang
58b493abf6 Skip wifi stats test if link layer stats is not supported
Wifi link layer is an optional feature so this test will be
failed on wifi stats check if a device does not support it.
Add a check to know if the  device supports wifi link layer
stats and skip it if it is not supported.

Ignore-AOSP-First: Needs cherry-picks
Bug: 195518957
Test: CtsNetTestCases:BatteryStatsManagerTest
Change-Id: I592dd5f1d6e13b020beadb11b9d913857a82e524
2021-08-10 14:37:51 +08:00
Chiachang Wang
8787b2ab68 Remove the @Ignore annotation on testAvoidBadWifi am: 73745baa38 am: 3bac051c7a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1773885

Change-Id: Ibec81bed964cab7f9bc18cf7cabf0b52d0eeb824
2021-08-10 05:41:23 +00:00
Chiachang Wang
3bac051c7a Remove the @Ignore annotation on testAvoidBadWifi am: 73745baa38
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1773885

Change-Id: I6e57345d5debfb6d50e623dcb9e3e218b2057be5
2021-08-10 05:32:25 +00:00
Chiachang Wang
73745baa38 Remove the @Ignore annotation on testAvoidBadWifi
testAvoidBadWifi could pass without issue. The refactor should
also be done. The test does not need to be ignored now. Remove
the annotation to bring the test coverage back.

Bug: 178071397
Test: atest ConnectivityServiceTest
Change-Id: I5652fa817f16b8c241f1e2066a0b04ad2156a3b7
2021-08-10 05:17:29 +00:00
Lucas Lin
9e2ffd6a23 Merge "Add test for [stop|start]VpnProfile()" into sc-dev am: 2900ffbb5f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15359731

Change-Id: Ieb3774e45cacb9c9e2e3ebea1ba55c757d2679e8
2021-08-10 02:38:50 +00:00
Lucas Lin
2900ffbb5f Merge "Add test for [stop|start]VpnProfile()" into sc-dev 2021-08-10 02:28:24 +00:00
TreeHugger Robot
bf194108c9 [automerger skipped] Merge "Use dns resolver v9 in connectivity and set resolverOptions to null." into sc-dev am: 4e257a92ca -s ours
am skip reason: Merged-In I310a79521f5a365e50e2c65e9dd87d9b68f105d7 with SHA-1 30bebea049 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15482197

Change-Id: I0bf4cd33d15002e48a0eeb77d7701e52f6d7a285
2021-08-06 18:59:24 +00:00
TreeHugger Robot
4e257a92ca Merge "Use dns resolver v9 in connectivity and set resolverOptions to null." into sc-dev 2021-08-06 18:35:45 +00:00
Luke Huang
2bb20e6637 Merge "Use dns resolver v9 in connectivity and set resolverOptions to null." am: d4c0d59179 am: 29b6cb0288
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1789012

Change-Id: I601a0046b5ae33cee9d267c7a4bdc1ead949ae22
2021-08-06 17:46:22 +00:00
Luke Huang
29b6cb0288 Merge "Use dns resolver v9 in connectivity and set resolverOptions to null." am: d4c0d59179
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1789012

Change-Id: I4fc4579247497a74489b028b040da2425415a312
2021-08-06 17:29:57 +00:00
Luke Huang
d4c0d59179 Merge "Use dns resolver v9 in connectivity and set resolverOptions to null." 2021-08-06 17:10:36 +00:00
Remi NGUYEN VAN
0ccf3fb461 Use dns resolver v9 in connectivity and set resolverOptions to null.
The resolverOptions member of the ResolverParamsParcel has never
been set by AOSP code but was only used by OEMs modifying
DnsManager. Now that DnsManager is mainline code, this is no
longer possible. So the DNS resolver introduces a new
setResolverOptions IPC to allow OEMs to set the options and makes
the resolverOptions nullable.

Make DnsManager set resolverOptions to null, to ensure that when
DnsManager calls setResolverConfiguration, it does not overwrite
any options set by the OEM.

Bug: 194048056
Test: Device boots and has connectivity
Change-Id: I310a79521f5a365e50e2c65e9dd87d9b68f105d7
Merged-In: I310a79521f5a365e50e2c65e9dd87d9b68f105d7
2021-08-06 22:21:51 +09:00
Remi NGUYEN VAN
30bebea049 Use dns resolver v9 in connectivity and set resolverOptions to null.
The resolverOptions member of the ResolverParamsParcel has never
been set by AOSP code but was only used by OEMs modifying
DnsManager. Now that DnsManager is mainline code, this is no
longer possible. So the DNS resolver introduces a new
setResolverOptions IPC to allow OEMs to set the options and makes
the resolverOptions nullable.

Make DnsManager set resolverOptions to null, to ensure that when
DnsManager calls setResolverConfiguration, it does not overwrite
any options set by the OEM.

Bug: 194048056
Test: Device boots and has connectivity
Change-Id: I310a79521f5a365e50e2c65e9dd87d9b68f105d7
2021-08-06 21:19:38 +09:00
Benedict Wong
8ae7eba5c2 [automerger skipped] Update ConnDiags CTS test to expect validation result SKIPPED. am: ae00382c67 -s ours
am skip reason: Merged-In I78b78919d5b0f09348dfdd5fdb37418b8c7f861f with SHA-1 f1120be78b is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15474912

Change-Id: I14acd7073b59e734a76a67240fac25398566e708
2021-08-06 11:44:02 +00:00
Benedict Wong
ae00382c67 Update ConnDiags CTS test to expect validation result SKIPPED.
This CL updates ConnectivityDiagnosticsManagerTest to expect
NETWORK_VALIDATION_RESULT_SKIPPED for its TestNetworks. The tests also
expect a ConnectivityReport to be sent for all calls to
ConnectivityManager#reportNetworkConnectivity.

This change is different from the one pushed into AOSP & the mainline
modules; this allows both SKIPPED and VALID in the intermediate time
while module prebuilts are generated. MTS will enforce the stricter
SKIPPED check, while this allows both the S-release behavior and
mainline update behavior.

Bug: 162407730
Bug: 195727283
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: Ia0bf1bb53289b079f26597f09b0759a89deb681f
Merged-In: I78b78919d5b0f09348dfdd5fdb37418b8c7f861f
2021-08-06 18:08:48 +09:00
Chiachang Wang
a758f40ef9 Do callback unregistration automatically in tearDown am: 7a45f107de am: 4e0841524b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1787229

Change-Id: I8f72e741567288717bbc94e115f9aa0816cfad86
2021-08-05 14:14:02 +00:00
Chiachang Wang
4e0841524b Do callback unregistration automatically in tearDown am: 7a45f107de
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1787229

Change-Id: I9b2c27c6ebe2c64c95a921a5bdc363e5d8b92e43
2021-08-05 14:02:11 +00:00
Chiachang Wang
7a45f107de Do callback unregistration automatically in tearDown
Ideally, unregisterCallbackQuietly() is only needed when the
callback is registered in the try block. The callbacks
registration located outside the try block should be
registered theoretically. Otherwise, it may be a bug if the
tests get the IllegalArgumentException.

Use unregisterCallbackQuietly() in all finally may cause bug
in unregisterNetworkCallback invisible.

However, it may cause different tests with different code to
do the unregistration. Thus, do a refactor to add some methods
to wrap the NetworkCallback registration. This allows the tests
to do the unregister automatically in the tearDown().

Bug: 195364778
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: If06993f643ac7aeb23638a283347c427934a2f99
2021-08-05 19:47:20 +08:00
Chalard Jean
9f20b8ede3 Merge "Revert "Allow network providers to set yield to bad wifi"" into sc-dev am: e8b35336f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15443464

Change-Id: I9d23da353164bfef42d63ffe7f0fa82d32987be0
2021-08-05 11:40:54 +00:00
Chalard Jean
e8b35336f4 Merge "Revert "Allow network providers to set yield to bad wifi"" into sc-dev 2021-08-05 11:31:40 +00:00
Remi NGUYEN VAN
6c7570ae90 Mock connectivity resources in integration tests
The resources may have different values depending on devices, and
resources IDs may mismatch if the test was not built at the same time as
the installed module, so mock the resources to allow running the
integration tests on more builds.

Bug: 193847396
Test: atest FrameworksNetIntegrationTests
Merged-In: Ic33d897690a8ea84a78c01dc5f2b2e2c473d57df
Change-Id: Ic33d897690a8ea84a78c01dc5f2b2e2c473d57df
2021-08-05 16:45:59 +09:00
Remi NGUYEN VAN
0285b1d8a8 Merge changes Ic33d8976,Ib5bd74d8 into sc-dev am: 6c1e049e29
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15461111

Change-Id: Id2cb24cb61df117b509b775cc9b15d7864fc1453
2021-08-05 07:29:48 +00:00