Commit Graph

13375 Commits

Author SHA1 Message Date
Anton Hansson
154ec0442e Include sdk versioning proto in tethering apex am: 89eb55fb8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14683380

Change-Id: Ib0c8fe59490fe6360ea9874dda04ea9a32f44832
2021-05-26 11:42:05 +00:00
Nikita Ioffe
26179fca42 Merge "Mark tethering apex as compressible" am: d2d0d82a1d am: c16043bc0d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1573041

Change-Id: I06e187c8b8db28809cd12e0f3145806e87f47cac
2021-05-26 11:02:12 +00:00
Nikita Ioffe
c16043bc0d Merge "Mark tethering apex as compressible" am: d2d0d82a1d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1573041

Change-Id: I56432a85f74385a9b3557c70aff5aed1d25abc3d
2021-05-26 10:44:36 +00:00
Nikita Ioffe
d2d0d82a1d Merge "Mark tethering apex as compressible" 2021-05-26 10:29:16 +00:00
Anton Hansson
89eb55fb8a Include sdk versioning proto in tethering apex
Allows SdkExtensions to inspect its version to decide what the extension
sdk version is on-device.

Bug: 188787081
Test: m com.android.tethering and inspect
Ignore-AOSP-first: internal topic, will cherry-pick after submission
Change-Id: If2d28b02be871594fed1fbb40b7aad284b553afb
2021-05-25 13:01:31 +01:00
Bill Yi
3a9562f000 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 58b943a701 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I5d2c0b09f9ee6b2e078c07eb160d17d24f26ce3a
2021-05-25 04:06:21 +00:00
Bill Yi
58b943a701 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I764f64b9ce1284955530e1c1b40c6441691845e2
2021-05-24 18:12:15 -07:00
Maciej Żenczykowski
705d0a9644 Merge "Fix memory access violation in NetworkStack" am: fc592e8bc0 am: d417b64774
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1715797

Change-Id: Idee66cfaec05391020420070ed8874b7b8c5f1bf
2021-05-25 00:18:35 +00:00
Remi NGUYEN VAN
a986212f6a [automerger skipped] Merge "Merge history of packages/Connectivity" am: e107f26c5d am: d9338f3219 -s ours
am skip reason: Merged-In I3c2563d4ae4e3715d0c6270344ba8f7ef067872f with SHA-1 2afd0986d3 is already in history

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

Change-Id: I9839115a1c8d9d1cee469ca21f174aa89dd5e75b
2021-05-25 00:18:04 +00:00
Maciej Żenczykowski
d417b64774 Merge "Fix memory access violation in NetworkStack" am: fc592e8bc0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1715797

Change-Id: I659fb171fd5e3851cad8f9bcc6bacfea908a2125
2021-05-24 23:58:56 +00:00
Remi NGUYEN VAN
d9338f3219 Merge "Merge history of packages/Connectivity" am: e107f26c5d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1714872

Change-Id: Ib84d148f27e154ce02c0df2d0ca33692455d6048
2021-05-24 23:57:28 +00:00
Maciej Żenczykowski
fc592e8bc0 Merge "Fix memory access violation in NetworkStack" 2021-05-24 23:56:06 +00:00
Remi NGUYEN VAN
e107f26c5d Merge "Merge history of packages/Connectivity" 2021-05-24 23:32:43 +00:00
Baligh Uddin
087dd90e5b Merge history of packages/Connectivity am: 2afd0986d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14700782

BUG: 186628461
Merged-In: Ie82d0fb34bda77543e31c82660c6f315efa87f62
Change-Id: Ia7945b929573c9a5e697fb69358cd6d3c8beab00
2021-05-24 08:21:53 +00:00
Ye Jiao
86f56a135a Fix memory access violation in NetworkStack
Fix memory access violation in com_android_networkstack_tethering_BpfUtils.cpp
caused by invalid format string in com_android_networkstack_tethering_BpfUtils_isEthernet.
If rv is not valid, jniThrowException will format a string using
"Unknown hardware address type %s on interface %s". However, rv is an int but here
"%s" is used in fmt string, thus causing access violation of memory.

Use "%d" instead of "%s" for int.

Bug: 188757793
Change-Id: I9d8ec0708efd747e24b3b3ffed5336434d4f64a7
2021-05-24 06:12:56 +00:00
Baligh Uddin
3684713b8a Merge history of packages/Connectivity
Modified License Import for:
- Tethering/common/TetheringLib/Android.bp
- framework/Android.bp
- service/Android.bp
- tests/common/Android.bp
- tests/deflake/Android.bp
- tests/integration/Android.bp
- tests/smoketest/Android.bp
- tests/unit/Android.bp
- tests/unit/jni/Android.bp

BUG: 186628461
TEST: TH
Merged-In: I7b5fd61cd551c7010f5b8ceabbfdd04f30f648dd
Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Change-Id: Ia2185820f485e8ad2d3626a96eab7f5a874736cf
2021-05-24 05:45:18 +00:00
Baligh Uddin
2afd0986d3 Merge history of packages/Connectivity
Modified Visibility / Includes for:
- Tethering/common/TetheringLib/Android.bp

Modified License Import for:
- framework/Android.bp
- service/Android.bp
- tests/common/Android.bp
- tests/deflake/Android.bp
- tests/integration/Android.bp
- tests/smoketest/Android.bp
- tests/unit/Android.bp
- tests/unit/jni/Android.bp
Modified Lint mapping for:
- framework/lint-baseline.xml
- service/lint-baseline.xml

BUG: 186628461
TEST: TH
Merged-In: Ie82d0fb34bda77543e31c82660c6f315efa87f62
Change-Id: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
2021-05-24 04:40:14 +00:00
Mark Chien
1217274ac0 Merge "Disable tryCell when UpstreamMonitor stop" am: 011552cc54 am: bed1ae7b4c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1715791

Change-Id: I4f55ae5885e3904d0d2d17384875cb00809a0eed
2021-05-24 03:00:20 +00:00
Mark Chien
bed1ae7b4c Merge "Disable tryCell when UpstreamMonitor stop" am: 011552cc54
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1715791

Change-Id: If734189ea422c37e524dc1fc6ad107307c7b0ad3
2021-05-24 02:44:59 +00:00
Mark Chien
011552cc54 Merge "Disable tryCell when UpstreamMonitor stop" 2021-05-24 02:27:13 +00:00
TreeHugger Robot
958fe9a51d Merge changes I1de322c9,Id0983d4b into sc-dev
* changes:
  Improve IKEv2/IPsec VPN by proposing more IPsec algorithms
  Improve IKEv2/IPsec VPN by proposing more IKE algorithms
2021-05-22 05:05:51 +00:00
TreeHugger Robot
424e2ef3aa Merge "Check location permission for ConnDiags last." into sc-dev 2021-05-22 05:01:18 +00:00
TreeHugger Robot
08bbc34bbe Merge "Use CS identity to update setting while performing factory reset" into sc-dev 2021-05-22 04:59:28 +00:00
Baligh Uddin
3dcbcae839 Merge "Add OWNERS block for migration" 2021-05-22 04:01:33 +00:00
Yan Yan
f1ea9b302c Improve IKEv2/IPsec VPN by proposing more IPsec algorithms
This commit allows IKEv2/IPsec VPN to propose more algorithms that
newly added in IpSecAlgorithm. Those new algorithms have stronger
security guarantees and better performances.

This commit also removes algorithm name validation because all
algorithms are URL encoded to ensure no special characters create
problems due to their use by VpnProfile for list or field delimiting
(e.g. rfc7539esp(chacha20,poly1305))

Bug: 185265778
Test: atest FrameworksNetTests, CtsNetTestCases
Test: All new algorithms are manually verified
Change-Id: I1de322c95aacc8924e95bcdbcfdbd1ec441de99c
Merged-In: I1de322c95aacc8924e95bcdbcfdbd1ec441de99c
2021-05-21 23:33:23 +00:00
Yan Yan
5cb9e37a55 Merge "Improve IKEv2/IPsec VPN by proposing more IPsec algorithms" 2021-05-21 22:00:30 +00:00
Yan Yan
f3cf55f793 Improve IKEv2/IPsec VPN by proposing more IPsec algorithms
This commit allows IKEv2/IPsec VPN to propose more algorithms that
newly added in IpSecAlgorithm. Those new algorithms have stronger
security guarantees and better performances.

This commit also removes algorithm name validation because all
algorithms are URL encoded to ensure no special characters create
problems due to their use by VpnProfile for list or field delimiting
(e.g. rfc7539esp(chacha20,poly1305))

Bug: 185265778
Test: atest FrameworksNetTests, CtsNetTestCases
Test: All new algorithms are manually verified
Change-Id: I1de322c95aacc8924e95bcdbcfdbd1ec441de99c
2021-05-21 17:46:54 +00:00
Baligh Uddin
0e8ea277cd Add OWNERS block for migration
BUG: 186628461
Test: TH
Change-Id: Id03e0dfbe621b8ad08e594c0f6525ad9240837ae
2021-05-21 16:33:32 +00:00
Mark Chien
6189804a78 Merge "Test tethered callback with TetheringInterface" into sc-dev am: fcda6f1131
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14622456

Change-Id: Ieaf91ca0b5ebff475a24a21ac0b483591f81207e
2021-05-21 16:24:28 +00:00
Cody Kesting
0b4be0203d Check location permission for ConnDiags last.
This CL updates ConnectivityService to check location permissions for
ConnectivityDiagnostics callbacks last in the permission check process.
This minimizes misattribution of location access for networks that an
app is not administering.

This CL also updates ConnectivityDiagnosticsManager documentation to
clearly state that location permissions are required in order to receive
callbacks.

Bug: 187310575
Test: atest ConnectivityDiagnosticsManagerTest
Test: atest ConnectivityServiceTest
Change-Id: I2dbeddac6273e2392ccaeae51a1c7776d6d3da75
Merged-In: I2dbeddac6273e2392ccaeae51a1c7776d6d3da75
(cherry picked from commit f3d0fc49db)
2021-05-21 16:22:50 +00:00
Mark Chien
fcda6f1131 Merge "Test tethered callback with TetheringInterface" into sc-dev 2021-05-21 16:04:47 +00:00
markchien
89f2670b65 Disable tryCell when UpstreamMonitor stop
tryCell configuration would not be force disabled UpstreamMonitor stop.
If tethering stop with using mobile upstream and swap with SIM fron no
dun to dun supported, dun request would be filed even tethering is not
active.

Bug: 173068192
Test: atest TetheringTests
Change-Id: I5505655f52da9fdca2fd43a58e043a9ab727741d
2021-05-21 20:35:11 +08:00
Junyu Lai
cdfe0911c1 Merge "Add CTS for getAllNetworkStateSnapshots" into sc-dev am: 9a4c06f276
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14598438

Change-Id: Ica5635e919edc09bcd208226a0551749dd369ef5
2021-05-21 09:51:22 +00:00
Junyu Lai
9a4c06f276 Merge "Add CTS for getAllNetworkStateSnapshots" into sc-dev 2021-05-21 09:36:49 +00:00
Orion Hodson
544989351f Merge "Move to renamed NDK symbol AFileDescriptor_getFd" 2021-05-21 08:29:52 +00:00
Chiachang Wang
158fae71b4 Merge "Unify the verification for unregister a NetworkAgent" am: 14e14a36ea am: 65fd62fc63
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1664603

Change-Id: I8559fb107b6b70a34dc3d088e212fe85546af433
2021-05-21 08:20:57 +00:00
Chiachang Wang
65fd62fc63 Merge "Unify the verification for unregister a NetworkAgent" am: 14e14a36ea
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1664603

Change-Id: I56c9f3a74097256190f442e54f0227c495ff9006
2021-05-21 08:05:13 +00:00
Treehugger Robot
fac2a72593 Use CS identity to update setting while performing factory reset
When apps try to call factoryReset to do networking reset, it
will result in updating the setting in SettingsProvider.
ContentProvider will verify if the package name of the caller
that initiated the request being processed on the current thread.
The package should belong to the calling UID. The setting update
started from the ConnectivityService context, so the package will
be android but the calling UID will be the calling app. It will
cause a SecurityException. The behavior is fine previously as its
known caller(Settings) shares system UID. But it will be a
problem for other callers, such as CTS. Thus, clear the identity
since the necessary permission check should be examined at the
top of the method. The following actions should be fine to be
proceed from the system itself. Also replace the user restriction
check via hasUserRestrictionForUser with the UserHandle created
from the calling uid to ensure it's verified with correct user.

Bug: 186061922
Test: Factory reset from Settings
Merged-In: If2dd69f702a1eafff331f9e71f6b92aeadfb715d
Change-Id: If2dd69f702a1eafff331f9e71f6b92aeadfb715d
(cherry picked from commit 10ba4b773b)
2021-05-21 08:01:37 +00:00
Chiachang Wang
0aa413eba7 Add test for NetworkCapabilities.Builder.withoutDefaultCapabilities
Bug: 186061922
Test: atest CtsNetTestCases:android.net.NetworkCapabilitiesTest
Merged-In: I369e71dd6ae85da78e114ea8377967ab0bde787b
Change-Id: I369e71dd6ae85da78e114ea8377967ab0bde787b
(cherry picked from commit 0aa0790dec)
2021-05-21 07:54:46 +00:00
Chiachang Wang
14e14a36ea Merge "Unify the verification for unregister a NetworkAgent" 2021-05-21 07:47:58 +00:00
junyulai
3a64e80dee Add CTS for getAllNetworkStateSnapshots
Ignore-AOSP-First: Needs cherry-picks
Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest#testGetAllNetworkStateSnapshots --rerun-until-failure 100
Test: atest
CtsNetTestCasesLatestSdk:android.net.cts.ConnectivityManagerTest on R
device
Bug: 188140631

Change-Id: I573b009bd05bbc0c855aaa6e20cb8ebde6729936
2021-05-21 06:43:31 +00:00
TreeHugger Robot
310be1f034 Merge "Add CTS for NetworkAgentConfig#setSubscriberId" into sc-dev am: 323a05334b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14639705

Change-Id: If01d91221d48ab6b12c688ee234fded218480b40
2021-05-21 04:13:04 +00:00
TreeHugger Robot
323a05334b Merge "Add CTS for NetworkAgentConfig#setSubscriberId" into sc-dev 2021-05-21 03:50:11 +00:00
Chiachang Wang
32bd81d88b Merge "Add test for NetworkCapabilities.Builder.withoutDefaultCapabilities" 2021-05-21 03:33:23 +00:00
Junyu Lai
21c9a28ba0 Merge "Fix TetheringTest crash on eng build" am: ff77e99cf0 am: 2d5584fc34
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1711433

Change-Id: I76bacf4edde90cb658fa74ccd8079a2ba68b9f91
2021-05-21 03:08:37 +00:00
Junyu Lai
2d5584fc34 Merge "Fix TetheringTest crash on eng build" am: ff77e99cf0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1711433

Change-Id: Ie7f1f8c1098cd839cb490e028b788e14f778677a
2021-05-21 02:52:49 +00:00
Junyu Lai
ff77e99cf0 Merge "Fix TetheringTest crash on eng build" 2021-05-21 02:40:13 +00:00
Chiachang Wang
92346fdf33 Add test for NetworkCapabilities.Builder.withoutDefaultCapabilities
Bug: 186061922
Test: atest CtsNetTestCases:android.net.NetworkCapabilitiesTest
Change-Id: I369e71dd6ae85da78e114ea8377967ab0bde787b
2021-05-21 09:57:42 +08:00
Treehugger Robot
049dbc5697 Merge "Use CS identity to update setting while performing factory reset" 2021-05-21 01:26:05 +00:00
Cody Kesting
c5f9939bf3 Merge "Check location permission for ConnDiags last." 2021-05-20 21:27:46 +00:00