Commit Graph

28957 Commits

Author SHA1 Message Date
Bill Yi
e421b1eaad Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie74e329e714a4399f121546b858154098e8c60c0
2021-06-11 10:00:29 +00:00
TreeHugger Robot
532c1a2b5e Merge changes Ib8fe719f,Ia8c05780 into sc-dev am: 3ea9a136fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14779544

Change-Id: I11b73ce42cae4df5314ad58e0a92b4cb834b8ff1
2021-06-10 14:54:34 +00:00
markchien
dc664bd9e9 Remove *Locked wording am: 8409a1c297
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14673213

Change-Id: I54fea6433eeffd506378cb5246a0ab42fe4de680
2021-06-10 14:54:32 +00:00
TreeHugger Robot
3ea9a136fa Merge changes Ib8fe719f,Ia8c05780 into sc-dev
* changes:
  Suppress IpServer message logs
  Remove *Locked wording
2021-06-10 14:34:08 +00:00
Remi NGUYEN VAN
a6255e6589 Merge "Update TetheringTests for new connectivity shims" into sc-dev am: b81724602f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14928587

Change-Id: I0da9c2e6717256ea88176c836ea5b6ac67919a0a
2021-06-10 14:05:20 +00:00
Remi NGUYEN VAN
b81724602f Merge "Update TetheringTests for new connectivity shims" into sc-dev 2021-06-10 13:45:12 +00:00
Remi NGUYEN VAN
c94a1ffd55 Update TetheringTests for new connectivity shims
The stable connectivity shims are updated to now contain S API, so
tethering tests that assumed that compatibility R behavior was used need
to be updated.

To avoid such failures Tethering tests should have a test target using
updated shims (TetheringNextTests), but this was not done in S
timeframe.

Ignore-AOSP-First: topic needs differences in AOSP
Bug: 189581241
Test: atest TetheringTests
Change-Id: Ibc04e64a1e9d82b67aff10d1a6d77f9e6b1bbdfb
2021-06-10 13:44:00 +00:00
TreeHugger Robot
6f249d2582 Merge changes I00d1aa47,Icffbe67f into sc-dev am: c056232f0e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14911203

Change-Id: I60f42848b46edcef0d29fa355c663ab08a586c4b
2021-06-10 13:30:55 +00:00
Yan Yan
9e754b2514 Add tests for new IPsec algorithms in IpSecManagerTest am: 9447bbf6c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14911202

Change-Id: I9e54e3021f0d938dfb07658e3677c62e3448bf66
2021-06-10 13:30:51 +00:00
markchien
3b3d92ced0 Suppress IpServer message logs
To avoid log flooding, suppress CMD_IPV6_TETHER_UPDATE and
CMD_NEIGHBOR_EVENT message log because they appear frequentlg and
don't have any content which means they are ueseless for debugging.
Also remove logMessage from BaseServingState to fix duplicated
message because all the message already log in TetheredState
and LocalHotspotState which inherit BaseServingState.

Bug: 162920185
Bug: 185649441
Test: atest TetheringCoverageTests
      atest MtsTetheringTestLatestSdk
      atest CtsTetheringTest
Change-Id: Ib8fe719f3c1c4a65e6b5152df5e5adf33aba2079
Merged-In: Ib8fe719f3c1c4a65e6b5152df5e5adf33aba2079
2021-06-10 21:13:44 +08:00
markchien
8409a1c297 Remove *Locked wording
Since tethering run in single thread without any synchronized lock,
remove "Locked" wording from the methods which the use lock before.

Bug: 162920185
Test: atest TetheringCoverageTest
Change-Id: Ia8c057800cab30cdcbacae4db2d706b6427e9861
Merged-In: Ia8c057800cab30cdcbacae4db2d706b6427e9861
2021-06-10 21:13:07 +08:00
TreeHugger Robot
c056232f0e Merge changes I00d1aa47,Icffbe67f into sc-dev
* changes:
  Add CTS for AES-CMAC
  Add tests for new IPsec algorithms in IpSecManagerTest
2021-06-10 13:11:03 +00:00
Treehugger Robot
4db91ab936 Fix restorePrivateDnsSetting with null hostnames am: 7fd2b373ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14911838

Change-Id: If1e643887b191942217d5589f933bd924c0ff849
2021-06-10 00:06:44 +00:00
Treehugger Robot
7fd2b373ff Fix restorePrivateDnsSetting with null hostnames
When private DNS setting was set to opportunistic (mode) and null
(hostname), CtsNetUtils would not restore it.

Make sure that private DNS settings are restored after every test. Also
fail if restore is called without having saved any setting beforehand.

Bug: 190465704
Test: atest CtsNetTestCases
Original-Change: https://android-review.googlesource.com/1729162
Merged-In: Ic5d8d8b729469e0eef89a0b53f166e604264c1ee
Change-Id: Ic5d8d8b729469e0eef89a0b53f166e604264c1ee
2021-06-09 10:05:18 +00:00
TreeHugger Robot
04453f641a Merge "Fix TetheringTest crash on eng build" into sc-dev am: f15137fb9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14637501

Change-Id: I8cd2c8a60e72f28aaf3b931ad7701263d8fd9b29
2021-06-09 08:14:54 +00:00
TreeHugger Robot
f15137fb9f Merge "Fix TetheringTest crash on eng build" into sc-dev 2021-06-09 07:57:25 +00:00
junyulai
9c5d40beca Fix TetheringTest crash on eng build
startTrackDefaultNetwork was allowed to called multiple times
before even though there is no one actually do it. However,
in the TetheringTest#verifyDefaultNetworkRequestFiled, a
manual invocation is used to ensure that function supports
multiple entrance.

But with aosp/1697371, startTrackDefaultNetwork is no longer
allowed to be called multiple times, it would lead to log.wtf
and crash system in eng build.

Since the manual invocation of startTrackDefaultNetwork is not
realistic and no longer valid anymore, remove the invocation
that caused the trouble.

Test: atest TetheringCoverageTests
Bug: 188613493
Merged-In: I61f6088783d521fd17ae1e87370842b4239fbe75
Change-Id: I61f6088783d521fd17ae1e87370842b4239fbe75
  (cherry-picked from aosp/1711433)
2021-06-09 01:57:37 +00:00
Yan Yan
0dd6de5842 Add CTS for AES-CMAC
This commit:
  - Verify AES-CMAC is supported in device that first
      launched with SDK beyond R
  - Verify IpSecTransforms can be built with AES-CMAC and
      traffic flows

Bug: 171083832
Test: atest IpSecManagerTest
Test: AES-CMAC tests are manually enabled and verified
Change-Id: I00d1aa475033810a5f60f0e3fc692be87ff62e13
Merged-In: I00d1aa475033810a5f60f0e3fc692be87ff62e13
(cherry picked from commit 0891de6311)
2021-06-08 18:25:04 -07:00
Yan Yan
9447bbf6c6 Add tests for new IPsec algorithms in IpSecManagerTest
This CL adds CTS tests that:
- Verify IpSecAlgorithm#getSupportedAlgorithms
- Verify new algorithms are supported in device that first
  launched with SDK beyond R
- Verify IpSecTransforms can be built with new algortihms and
  traffic flows

Since there is no hardware that first launched with SDK beyond R
at the time of writing this CL, tests for new algorithms were
manually enabled and verified on the pixel with an updated kernel.

Bug: 171083832
Test: atest IpSecManagerTest
Change-Id: Icffbe67fca29b051457dbf863ba3aaf653806a83
Merged-In: Icffbe67fca29b051457dbf863ba3aaf653806a83
(cherry picked from commit 5e692b6ca7)
2021-06-08 18:24:04 -07:00
TreeHugger Robot
a58037af96 Merge "Require location permission for ConnDiags WiFi only." into sc-dev am: 8e345e9637
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14885895

Change-Id: Id07bf1a5714a717176d003758fdf9b31fde0833a
2021-06-08 15:32:49 +00:00
TreeHugger Robot
8e345e9637 Merge "Require location permission for ConnDiags WiFi only." into sc-dev 2021-06-08 15:18:54 +00:00
Anton Hansson
f61dc66a91 Add tethering bootclasspath fragment to its sdk am: 3669599dec
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14881273

Change-Id: Ib4b4fc6e684f30a1bb9e1d27813274e7701ceeaf
2021-06-08 09:18:34 +00:00
Treehugger Robot
27b6888364 Require location permission for ConnDiags WiFi only.
This CL updates ConnectivityDiagnostics permission checks in
ConnectivityService to only require location permission for Networks
that have TRANSPORT_WIFI. This change is consistent with the location
restrictions required for the transports themselves. Previously,
location permissions were required for all Network types.

Bug: 187310575
Test: atest ConnectivityServiceTest ConnectivityDiagnosticsManagerTest
Change-Id: I48806533e4e705d2d9be45f3b3d3931d9294b167
Merged-In: I48806533e4e705d2d9be45f3b3d3931d9294b167
(cherry picked from commit 0990af5148)
2021-06-07 22:17:05 +00:00
Anton Hansson
3669599dec Add tethering bootclasspath fragment to its sdk
This subsumes the java_sdk_library in the sdk.

Bug: 188427719
Test: build_mainline_modules.sh
Change-Id: Ib2ebb3893135b4dd91812f1f1b0915540cfd64cb
2021-06-07 15:46:33 +01:00
Nikita Ioffe
9f59763887 Merge "Mark tethering apex as compressible" into sc-dev am: 8148656efc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14748198

Change-Id: I63b46890d67d85972a4d5ad0700d2917828f9fb6
2021-06-07 11:30:26 +00:00
Nikita Ioffe
8148656efc Merge "Mark tethering apex as compressible" into sc-dev 2021-06-07 11:13:35 +00:00
Paul Hu
6c3f2ea641 Merge "Move UIDS_ALLOWED_ON_RESTRICTED_NETWORKS setting" into sc-dev am: 48fc715694
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14772857

Change-Id: I1d74e05699d3ccaf882b9f8cc9d78ac39dd4483c
2021-06-07 09:50:24 +00:00
Paul Hu
48fc715694 Merge "Move UIDS_ALLOWED_ON_RESTRICTED_NETWORKS setting" into sc-dev 2021-06-07 09:29:56 +00:00
Paul Hu
b9d5a0b545 Merge "Address leftover comments" into sc-dev am: 9a8e4497a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14772851

Change-Id: Ie3e82c84cdfe8a9ea6a01859501f67ea472bc969
2021-06-07 09:03:47 +00:00
Paul Hu
9a8e4497a3 Merge "Address leftover comments" into sc-dev 2021-06-07 08:50:21 +00:00
Chiachang Wang
1c016b7f07 Add test for ConnectivityManager.factoryReset am: 3d60a42323
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14840205

Change-Id: Ib7edfb23781ad9ca3a2f8b4d3847f1ed9b58e4fd
2021-06-07 04:15:49 +00:00
Chiachang Wang
431ca78158 Correct the logic for CtsTetheringUtils.isWifiTetheringSupported am: 0acaa74538
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14840204

Change-Id: I4ea2374e8b1ce0a7bba540ebef93b222687790e9
2021-06-07 04:15:06 +00:00
Chiachang Wang
3d60a42323 Add test for ConnectivityManager.factoryReset
Bug: 186061922
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest
Test: atest CtsNetTestCasesLatestSdk on R and S device
Merged-In: I5d3e448ed00b9baeb64a08036ecac1f9c8206cc7
Change-Id: I5d3e448ed00b9baeb64a08036ecac1f9c8206cc7
2021-06-04 13:29:54 +00:00
Chiachang Wang
0acaa74538 Correct the logic for CtsTetheringUtils.isWifiTetheringSupported
The existing isWifiTetheringSupported only check if tethering side
supports wifi tethering or not but not wifi side. A expected
behavior should include both of them, so add the wifi side check
into the helper function. Also update in the existing caller side
due to a new parameter added.

Bug: 186061922
Test: atest MtsTetheringTestLatestSdk
Megred-In: Id69ac1d30ab2bbf23e870193335b139f54672636
Change-Id: Id69ac1d30ab2bbf23e870193335b139f54672636
Ignore-AOSP-First: cherry-pick
2021-06-04 13:29:38 +00:00
Paul Hu
44bfe2d4c0 Merge "Implement mobile data preferred uids feature" into sc-dev am: 87f2897f90
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14732015

Change-Id: Ic0b248bc137b694aed5fcfc1766093c85ed61711
2021-06-04 09:15:22 +00:00
Paul Hu
87f2897f90 Merge "Implement mobile data preferred uids feature" into sc-dev 2021-06-04 08:55:31 +00:00
Aaron Huang
d80dfe936b Merge "Remove framework-connectivity-annotations library" into sc-dev am: 059ddb4025
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14731888

Change-Id: Idba65290a50bf4ab2f2fafa135fdcf0f8a4fa3e7
2021-06-03 06:14:47 +00:00
TreeHugger Robot
ce42528d72 Merge changes I81bf8969,I2edba513,Ibb913979 into sc-dev am: 98c351f429
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14452540

Change-Id: I0de545e1e475d128919e06ef0a9398722d608b67
2021-06-03 06:14:33 +00:00
Chiachang Wang
40eec1eaf9 Merge "Unify the verification for unregister a NetworkAgent" into sc-dev am: 1084882539
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14706912

Change-Id: Ibcfb16860cf6e2606ad41607d64c5d8533372855
2021-06-03 06:14:26 +00:00
TreeHugger Robot
00c47e1c5a Merge "Fix memory access violation in NetworkStack" into sc-dev am: 1dc094b2c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14713334

Change-Id: Ie1eca928523704673fb42870df01644b215252de
2021-06-03 06:14:12 +00:00
Remi NGUYEN VAN
9fc5a2653c Skip merge of: Merge fixed history of Connectivity
This merges commit 1af06c78df with
"-s ours"

Bug: 186628461
Test: TH
Merged-In: Ib95d84b91a455d1a5f10cbf3f8c08c0459bc1c7c
Change-Id: I5fd3b9c2686f9261166ef8e16ce8d55e1eff2cd7
2021-06-03 11:00:24 +09:00
Remi NGUYEN VAN
8c05c9ec88 Merge fixed history of Connectivity
Bug: 189375701
Bug: 186628461
TEST: TH
Ignore-AOSP-First: per-branch merges
Merged-In: Ib95d84b91a455d1a5f10cbf3f8c08c0459bc1c7c
Change-Id: Id42a562cfaccc4bf0bae8a40635777841ed6d232
2021-06-03 10:43:01 +09:00
paulhu
71ad4f1175 Implement mobile data preferred uids feature
- Read MOBILE_DATA_PREFERRED_UIDS setting when system ready
- Register MOBILE_DATA_PREFERRED_UIDS setting observer
- Send uid ranges to netd when update mobile data preferred uids

Bug: 171872461
Test: atest FrameworksNetTests
Ignore-AOSP-First: Needs cherry-picks
Change-Id: I5153c770650594e05dfa8cf230d7381d790f4a55
2021-06-02 15:40:53 +08:00
paulhu
a1ac564748 Move UIDS_ALLOWED_ON_RESTRICTED_NETWORKS setting
Now, PermissionMonitor reigster observer to listen the change
from all users, but "uids allowed on restricted networks" should
affect to all users instead of per each user. Thus, move the
setting from Settings.Secure to Settings.Global.

Bug: 189705071
Test: atest FrameworksNetTests
Ignore-AOSP-First: Need cherry-pick
Change-Id: Ibea354d8dda1f02652a193820f3f9eb573b9a956
2021-06-01 21:28:34 +08:00
paulhu
5d8340f7ae Address leftover comments
- Add comment to highestPermissionForUid()
- Add testAppsAllowedOnRestrictedNetworksChangedMultipleUsers
- Add synchronized to guard mUidsAllowedOnRestrictedNetworks
  access.

Bug: 189705071
Test: atest FrameworksNetTests
Ignore-AOSP-First: Need cherry-pick
Change-Id: I9056758db15e8a21b84ef244d4cacf24c3b79894
2021-06-01 19:04:28 +08:00
Aaron Huang
059ddb4025 Merge "Remove framework-connectivity-annotations library" into sc-dev 2021-06-01 08:08:21 +00:00
TreeHugger Robot
98c351f429 Merge changes I81bf8969,I2edba513,Ibb913979 into sc-dev
* changes:
  Add CTS for NetworkScore.setTransportPrimary
  Add some CTS tests for NetworkScore.
  Add a first CTS for NetworkScore
2021-06-01 07:41:17 +00:00
Aaron Huang
cff22949d2 Remove framework-connectivity-annotations library
This library can be removed because the annotations are no longer
used out of module.

@RestrictBackgroundStatus and @MultipathPreference are defined
in connectivity mainline module. Annotate these in non-updatable
platform is not going to be manageable long term. For example,
if the module gets updated and the annotation gets more values
then it's a problem in non-updatable platform. So, it should
not have IntDef cross module boundaries.

Ignore-AOSP-First: AOSP doesn't include this change yet
Bug: 183972925
Test: build
Change-Id: I63f1fde73c4ffdaff9fda914e33cbb5a110ba64e
2021-06-01 06:47:47 +00:00
Chalard Jean
ee93b3d3b3 Add CTS for NetworkScore.setTransportPrimary
Ignore-AOSP-First: NetworkScore incomplete in AOSP
Bug: 184037351
Test: this
Change-Id: I81bf8969ace3cb6826b30c5bbd0b896c64c73c57
2021-06-01 02:20:57 +00:00
Chalard Jean
2d2ecc3cfb Add some CTS tests for NetworkScore.
Ignore-AOSP-First: NetworkScore incomplete in AOSP
Bug: 184037351
Test: this
Change-Id: I2edba51351cd4c71727663aa85b1d5141bff2a15
2021-06-01 02:20:54 +00:00