Commit Graph

11752 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
6d575cace8 Add framework-connectivity to the Tethering APEX
Add framework-connectivity and its jni library dependency to the APEX.

Bug: 171540887
Test: device boots, has connectivity
Ignore-AOSP-First: Merge conflicts, will cherry-pick

Change-Id: I72fc7fee7bfcd909cbc79b4c34e8b3f29055d378
2021-03-24 23:05:29 +09:00
Remi NGUYEN VAN
02b94faf80 Reference framework-connectivity stubs explicitly
To merge the framework-connectivity and framework-connectivity.impl
targets, framework-connectivity stubs need to be referenced explicitly
in java_sdk_libraries, otherwise the build system will currently see
dependency cycles.

Bug: 183600168
Test: m
Ignore-AOSP-First: Needs manual cherry-picks
Change-Id: I556747f9ba934f8b44b6ea9a518adbccc84ac2a9
2021-03-24 23:05:13 +09:00
Chiachang Wang
592d72bf4c [automerger skipped] Replace the usage of UidRange am: 2257ecc830 -s ours am: 5e8d1596b6 -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 41918d6cd1 is already in history

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

Change-Id: I056312ed3ec9c22854a09fa2f75cacca19c07e03
2021-03-23 05:12:05 +00:00
Chiachang Wang
c86cecc0cb [automerger skipped] Replace the usage of UidRange am: 2257ecc830 -s ours am: 20df1dc6cc -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 41918d6cd1 is already in history

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

Change-Id: I27f39c91f81a25cc03dbcc99b4b22569128b5eb9
2021-03-23 04:51:48 +00:00
Chiachang Wang
20df1dc6cc [automerger skipped] Replace the usage of UidRange am: 2257ecc830 -s ours
am skip reason: skip tag Change-Id I2550cb3ddd9c72c12de0dbf9baf32eec6fa3b151 with SHA-1 00950274cb is already in history

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

Change-Id: I9e89c1a6e81b97e37254a23a4c4e28356836b77a
2021-03-23 04:09:57 +00:00
Chiachang Wang
5e8d1596b6 [automerger skipped] Replace the usage of UidRange am: 2257ecc830 -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 c1f14634a4 is already in history

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

Change-Id: I01b4b6925c5976899584d663963b354b193e096e
2021-03-23 04:09:51 +00:00
Chiachang Wang
44582f2549 [automerger skipped] Replace the usage of UidRange am: 00950274cb -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 41918d6cd1 is already in history

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

Change-Id: I9e82ec7ffc167bb5a48b3d5c1f7ff350be61479c
2021-03-23 03:34:31 +00:00
Chiachang Wang
2257ecc830 Replace the usage of UidRange
The parameter of NetworkCapabilities.setUids() and
NetworkRequest.Builder.setUids() are updated to take a set of
integer Range instead of a set of UidRange because of refactor
work for the incoming connectivity mainline module.

The parameter change stops NetworkRequestTest to work in the
different API levels. Replace the usage with shims to work in
both current and stable APIs.

Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Merged-In: I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536
Merged-In: I2550cb3ddd9c72c12de0dbf9baf32eec6fa3b151
Change-Id: I90b3384d2a78275df9f8717dba9d654eb82036bd
2021-03-23 08:51:40 +09:00
Chiachang Wang
00950274cb Replace the usage of UidRange
The parameter of NetworkCapabilities.setUids() and
NetworkRequest.Builder.setUids() are updated to take a set of
integer Range instead of a set of UidRange because of refactor
work for the incoming connectivity mainline module.

The parameter change stops NetworkRequestTest to work in the
different API levels. Replace the usage with shims to work in
both current and stable APIs.

Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Merged-In: I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536
Change-Id: I2550cb3ddd9c72c12de0dbf9baf32eec6fa3b151
2021-03-23 08:48:41 +09:00
Treehugger Robot
009ce5040f [automerger skipped] Merge "Shorten the name for the dump file." am: a7542972b1 am: 3935ac08fd am: 9d3174e4cb -s ours
am skip reason: skip tag Change-Id Ic0f87b97bb58e115fe81e2d688ce0e633397da42 with SHA-1 2b5735165a is already in history

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

Change-Id: I6c7b77dfd766e7c8deec293a437d49e059fd85f3
2021-03-22 23:01:18 +00:00
Treehugger Robot
b412119253 [automerger skipped] Merge "Shorten the name for the dump file." am: a7542972b1 am: 3935ac08fd am: d802f4898f -s ours
am skip reason: skip tag Change-Id Ic0f87b97bb58e115fe81e2d688ce0e633397da42 with SHA-1 2b5735165a is already in history

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

Change-Id: Ie3c654e53d42ac4de12aed66aa7ec74373e2c929
2021-03-22 23:00:06 +00:00
Treehugger Robot
d802f4898f Merge "Shorten the name for the dump file." am: a7542972b1 am: 3935ac08fd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648668

Change-Id: Ia73a8459e6bba6f24fc1f40cdb8cfb3177d9f9bb
2021-03-22 22:20:28 +00:00
Treehugger Robot
9d3174e4cb Merge "Shorten the name for the dump file." am: a7542972b1 am: 3935ac08fd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648668

Change-Id: Ifb3ab6932f7c562456379f960c18a57ce03e11eb
2021-03-22 22:20:24 +00:00
Sudheer Shanka
15308ca45b [automerger skipped] Try reconnecting to wifi if it doesn't automatically connect. am: 8bb9eb1912 am: bc0ca639a2 am: 81330c83ce -s ours
am skip reason: skip tag Change-Id I31fb127ef333d39fe4697043876c7cef15d525e3 with SHA-1 aae0d619ae is already in history

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

Change-Id: Ib7e2365f676ef63f46b88a5d3e64c6aa29a17e37
2021-03-22 21:59:24 +00:00
Treehugger Robot
3935ac08fd Merge "Shorten the name for the dump file." am: a7542972b1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648668

Change-Id: I11f5ca67a111e7d923310b68d90f66ef383d015a
2021-03-22 21:55:45 +00:00
Sudheer Shanka
a0e282b018 [automerger skipped] Try reconnecting to wifi if it doesn't automatically connect. am: 8bb9eb1912 am: bc0ca639a2 am: e2a709360c -s ours
am skip reason: skip tag Change-Id I31fb127ef333d39fe4697043876c7cef15d525e3 with SHA-1 aae0d619ae is already in history

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

Change-Id: I989eba23f64e3587f539e318ee70b0b491fe5ee5
2021-03-22 21:40:46 +00:00
Treehugger Robot
a7542972b1 Merge "Shorten the name for the dump file." 2021-03-22 21:34:02 +00:00
Sudheer Shanka
e2a709360c Try reconnecting to wifi if it doesn't automatically connect. am: 8bb9eb1912 am: bc0ca639a2
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648670

Change-Id: Ibcd508be488d90fa147587dbc45de9a7066c8b8b
2021-03-22 21:15:58 +00:00
Sudheer Shanka
81330c83ce Try reconnecting to wifi if it doesn't automatically connect. am: 8bb9eb1912 am: bc0ca639a2
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648670

Change-Id: Ief4defadb6e4f5b45a7ef3d3022953244eca4788
2021-03-22 21:14:50 +00:00
Sudheer Shanka
bc0ca639a2 Try reconnecting to wifi if it doesn't automatically connect. am: 8bb9eb1912
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648670

Change-Id: I06fc9f6273a947811c97be0da2a642b078a372c2
2021-03-22 20:52:52 +00:00
Lorenzo Colitti
fdda59caed Mark most VpnServiceTest methods as @AppModeFull. am: 60b26ee453 am: f7ff930e3a am: 2583e758e4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648190

Change-Id: Ida43263266b11d1a8e8df40f90d7b9d57c146339
2021-03-22 20:14:27 +00:00
Lorenzo Colitti
cb938eca7b Mark most VpnServiceTest methods as @AppModeFull. am: 60b26ee453 am: f7ff930e3a am: 29ab4cfc4a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648190

Change-Id: I2e0c1d036bd8907df22eb98fa3d4a1218c5cfdc0
2021-03-22 19:55:59 +00:00
Lorenzo Colitti
29ab4cfc4a Mark most VpnServiceTest methods as @AppModeFull. am: 60b26ee453 am: f7ff930e3a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648190

Change-Id: I7789fd1cfab1516948d93ab4e8cbf0882faee082
2021-03-22 19:12:46 +00:00
Lorenzo Colitti
2583e758e4 Mark most VpnServiceTest methods as @AppModeFull. am: 60b26ee453 am: f7ff930e3a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648190

Change-Id: I3fe91bf6dd3c451aa01fbd5fcc290e8125adc43b
2021-03-22 19:12:34 +00:00
Sudheer Shanka
8bb9eb1912 Try reconnecting to wifi if it doesn't automatically connect.
When meteredness of wifi changes during test, wifi disconnects.
Try reconnecting if it automatically connects after this.
Also, change the way we update metereness so that we can
use callback mechanism to wait for the state change instead of
polling for it regularly.

Bug: 181686645
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Merged-In: I31fb127ef333d39fe4697043876c7cef15d525e3
Change-Id: Icc0b37730201aebeab2713c6527a3195f6dcf97d
2021-03-22 17:26:46 +00:00
Sudheer Shanka
8d92650da9 Shorten the name for the dump file.
The file name is getting truncated by tradefed and
we are missing the information to actually idenity
the test. So, instead shorten the filename to preserve
the test name.

Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Submitting internally first to avoid merge conflicts.
Merged-In: Ic0f87b97bb58e115fe81e2d688ce0e633397da42
Change-Id: I6ce3fc662782de82d8cad95414e24204b5f7f130
2021-03-22 17:24:46 +00:00
Sudheer Shanka
0d8452ab81 Merge "Try reconnecting to wifi if it doesn't automatically connect." into sc-dev 2021-03-22 17:12:30 +00:00
Sudheer Shanka
a8a84a64d5 Merge "Shorten the name for the dump file." into sc-dev 2021-03-22 17:12:25 +00:00
Lorenzo Colitti
f7ff930e3a Mark most VpnServiceTest methods as @AppModeFull. am: 60b26ee453
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1648190

Change-Id: I6fcb53be747a5e95d58f2d84b16214cf9607a3d0
2021-03-22 15:29:05 +00:00
Lorenzo Colitti
60b26ee453 Mark most VpnServiceTest methods as @AppModeFull.
In S, instant apps can no longer access the system service that
backs the VPN APIs, so these tests started to fail in instant
mode.

Regardless of that change in S, though, instant apps cannot
create VPNs because they cannot access the package manager.

Previously, the tests were only passing because they did not
check that the VPN would actually work, they only checked that
the VPN API calls failed.

Fix: 181575083
Test: atest --instant CtsNetTestCases:VpnServiceTest
Change-Id: Idd35051bd1c908a8b85c02e8d0c54d3dea2dde38
2021-03-22 13:16:02 +00:00
Treehugger Robot
88a8053afd [automerger skipped] Merge "Revert^2 "Replace the usage of UidRange"" am: bf0c19e52f -s ours am: 1baa39f7b1 -s ours am: 3e0e2d99c5 -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 41918d6cd1 is already in history

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

Change-Id: I2faee160c607f6784eb2fc2f951a638c2caecc18
2021-03-22 12:28:02 +00:00
Remi NGUYEN VAN
11e9938050 [automerger skipped] Move connectivity AIDLs to android.net am: cc305b2fa5 am: 1feb0c3076 am: 7c031b31b9 -s ours
am skip reason: skip tag Change-Id I23feb26c5de2fd7a4177797a3bc1d0dcbef4ade7 with SHA-1 9cb8dfc110 is already in history

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

Change-Id: Ia5ece90fe5ac9e9bb745964577c6e9ab2e8f0d53
2021-03-22 12:26:13 +00:00
Remi NGUYEN VAN
836e3e1276 Merge "Add framework-connectivity to tethering tests" into sc-dev 2021-03-22 04:19:31 +00:00
Treehugger Robot
2f96650bb5 [automerger skipped] Merge "Revert^2 "Replace the usage of UidRange"" am: bf0c19e52f -s ours am: 1baa39f7b1 -s ours am: c4d114ad6f -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 41918d6cd1 is already in history

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

Change-Id: Iae701c502dd7c17b33b8b3efaca38a632a71af0c
2021-03-21 18:28:38 +00:00
Remi NGUYEN VAN
07f733ed12 [automerger skipped] Move connectivity AIDLs to android.net am: cc305b2fa5 am: 1feb0c3076 am: ddd1a6b40a -s ours
am skip reason: skip tag Change-Id I23feb26c5de2fd7a4177797a3bc1d0dcbef4ade7 with SHA-1 9cb8dfc110 is already in history

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

Change-Id: I86a18da2694561794d1f9d6f1995bd6c854da48a
2021-03-21 18:08:24 +00:00
Treehugger Robot
3e0e2d99c5 [automerger skipped] Merge "Revert^2 "Replace the usage of UidRange"" am: bf0c19e52f -s ours am: 1baa39f7b1 -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 c1f14634a4 is already in history

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

Change-Id: I301142303402edb2a801014b937b5fbc37d1a8c7
2021-03-21 17:30:02 +00:00
Remi NGUYEN VAN
7c031b31b9 Move connectivity AIDLs to android.net am: cc305b2fa5 am: 1feb0c3076
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1596432

Change-Id: I45bfb05a3091d322b3395907d87334d406fee1cc
2021-03-21 17:29:04 +00:00
Treehugger Robot
c4d114ad6f [automerger skipped] Merge "Revert^2 "Replace the usage of UidRange"" am: bf0c19e52f -s ours am: 1baa39f7b1 -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 c1f14634a4 is already in history

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

Change-Id: I169190c331866089d76ba64faebc309dae827239
2021-03-21 17:27:12 +00:00
Remi NGUYEN VAN
ddd1a6b40a Move connectivity AIDLs to android.net am: cc305b2fa5 am: 1feb0c3076
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1596432

Change-Id: Ifd637a65600cc1185d27b15e486fcaeb83b244db
2021-03-21 17:26:59 +00:00
Treehugger Robot
1baa39f7b1 [automerger skipped] Merge "Revert^2 "Replace the usage of UidRange"" am: bf0c19e52f -s ours
am skip reason: skip tag Change-Id I4bc0daf5ad9e4b4043f4a897ddab16aec8f8a536 with SHA-1 c1f14634a4 is already in history

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

Change-Id: Id633ed17067ec06bb2a296d9e6c07a11db47978b
2021-03-21 16:55:29 +00:00
Treehugger Robot
bf0c19e52f Merge "Revert^2 "Replace the usage of UidRange"" 2021-03-21 16:41:13 +00:00
Remi NGUYEN VAN
1feb0c3076 Move connectivity AIDLs to android.net am: cc305b2fa5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1596432

Change-Id: I5825db16d1fc8f41f8ec99eb08fae550aed2cbc9
2021-03-21 16:37:03 +00:00
Sudheer Shanka
2b5735165a Shorten the name for the dump file.
The file name is getting truncated by tradefed and
we are missing the information to actually idenity
the test. So, instead shorten the filename to preserve
the test name.

Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Submitting internally first to avoid merge conflicts.
Change-Id: Ic0f87b97bb58e115fe81e2d688ce0e633397da42
2021-03-21 12:24:09 +00:00
Remi NGUYEN VAN
cc305b2fa5 Move connectivity AIDLs to android.net
java_sdk_libraries and apexes need to contain bootclasspath classes
under predefined packages. Tethering currently uses android.net, so make
sure all the connectivity bootclasspath classes are under android.net.

This avoids maintaining two packages for the tethering APEX, where
com.android.connectivity.aidl is only used by internal AIDL files.

Bug: 182984842
Test: m
Change-Id: I23feb26c5de2fd7a4177797a3bc1d0dcbef4ade7
Merged-In: I23feb26c5de2fd7a4177797a3bc1d0dcbef4ade7
2021-03-20 22:24:08 +09:00
Sudheer Shanka
aae0d619ae Try reconnecting to wifi if it doesn't automatically connect.
When meteredness of wifi changes during test, wifi disconnects.
Try reconnecting if it automatically connects after this.
Also, change the way we update metereness so that we can
use callback mechanism to wait for the state change instead of
polling for it regularly.

Bug: 181686645
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Submitting internally first to avoid merge conflicts
Change-Id: I31fb127ef333d39fe4697043876c7cef15d525e3
2021-03-20 04:36:47 -07:00
Remi NGUYEN VAN
34d197bc2d Add framework-connectivity to tethering tests
This is necessary for tethering tests to build against hidden
framework-connectivity APIs after it is moved out of
framework-minus-apex.

Bug: 179229316
Test: atest TetheringTests
Ignore-AOSP-First: Need manual cherry-picks
Change-Id: I912fcd19bacb75a5944409b07d8e014032657d4a
2021-03-19 13:16:01 +00:00
Maciej Żenczykowski
15c03bd9c8 bpf_progs - remove unused dependencies am: b1ffd2ce9b am: 2f780deb38 am: b40575e832
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1646235

Change-Id: I95bad9d6bba3f65a757b44b5890ec4cb7405c236
2021-03-19 11:11:37 +00:00
Remi NGUYEN VAN
66a8357ede Merge "Move connectivity AIDLs to android.net" into sc-dev 2021-03-19 10:51:22 +00:00
Maciej Żenczykowski
3f3743eb65 bpf_progs - remove unused dependencies am: b1ffd2ce9b am: 2f780deb38 am: d65201b5a1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1646235

Change-Id: Ie77273c3c40707d4324c1930a5be715968c0c2f8
2021-03-19 10:50:04 +00:00
Maciej Żenczykowski
d65201b5a1 bpf_progs - remove unused dependencies am: b1ffd2ce9b am: 2f780deb38
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1646235

Change-Id: I7fbb943db076cf3a70686a9c208bc82798a02cf1
2021-03-19 09:58:37 +00:00