Commit Graph

42770 Commits

Author SHA1 Message Date
Chiachang Wang
0fcf1cf17f Merge "Remove DISCONNECTING check from handleReportNetworkConnectivity" am: 9ad8acd76e am: ad07afc824
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1772439

Change-Id: I7a33259e571db42018d3f346bef4c3f71c586a0c
2021-07-26 11:21:48 +00:00
Chiachang Wang
ad07afc824 Merge "Remove DISCONNECTING check from handleReportNetworkConnectivity" am: 9ad8acd76e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1772439

Change-Id: I66569d993972c82400eb5583f182bedea9d75a54
2021-07-26 11:11:30 +00:00
Chiachang Wang
9ad8acd76e Merge "Remove DISCONNECTING check from handleReportNetworkConnectivity" 2021-07-26 10:58:58 +00:00
Paul Hu
0ce97e66c6 Merge "Address aosp/1740740 leftover comments" am: 1975a57e83 am: 1e594fa4db
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1775928

Change-Id: Ia63b7b3720e73378ccb509116ce5366913392526
2021-07-26 10:21:28 +00:00
Paul Hu
1e594fa4db Merge "Address aosp/1740740 leftover comments" am: 1975a57e83
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1775928

Change-Id: I8a901187e66a5f6dade6dfe36951949dcf80d458
2021-07-26 10:09:26 +00:00
Paul Hu
1975a57e83 Merge "Address aosp/1740740 leftover comments" 2021-07-26 09:49:27 +00:00
TreeHugger Robot
38211c3850 [automerger skipped] Merge "Change the url in testDownloadWithDownloadManagerDisallowed" into sc-dev am: 26848924ea -s ours
am skip reason: Merged-In I992c3240f0e133f5b00468cbe85d1545bcf786b0 with SHA-1 971c5fc0f8 is already in history

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

Change-Id: I89dba015680f04db1d3da8d5660cbdcaaaac95e9
2021-07-26 09:19:21 +00:00
Treehugger Robot
e3e529150f Merge "Add TetheringPrivilegedTests to postsubmit" am: 94ef708b7d am: 6971e4811f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1771186

Change-Id: I644b99720cf5af80c26f0f0ee12c49918f0895ef
2021-07-26 09:15:51 +00:00
TreeHugger Robot
26848924ea Merge "Change the url in testDownloadWithDownloadManagerDisallowed" into sc-dev 2021-07-26 09:04:54 +00:00
Treehugger Robot
6971e4811f Merge "Add TetheringPrivilegedTests to postsubmit" am: 94ef708b7d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1771186

Change-Id: I7c3e01900da2ef73aed6d2cccb15d2ea9e789cb1
2021-07-26 08:59:37 +00:00
Treehugger Robot
94ef708b7d Merge "Add TetheringPrivilegedTests to postsubmit" 2021-07-26 08:50:07 +00:00
Paul Hu
deaebe4818 Merge "Rename PREFERENCE_PRIORITY_* to PREFERENCE_ORDER_*" am: 0e3b1e0b57 am: 02c83293d6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1764732

Change-Id: I59b79a72ae8237997eae4b23b1a91e2cb40674a8
2021-07-26 08:35:49 +00:00
Paul Hu
02c83293d6 Merge "Rename PREFERENCE_PRIORITY_* to PREFERENCE_ORDER_*" am: 0e3b1e0b57
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1764732

Change-Id: Ie77a33aedbb7e68c89c5aaf15fe6f4cce344f283
2021-07-26 08:24:20 +00:00
Paul Hu
0e3b1e0b57 Merge "Rename PREFERENCE_PRIORITY_* to PREFERENCE_ORDER_*" 2021-07-26 08:12:42 +00:00
Paul Hu
b08d0afb87 [automerger skipped] Merge "Temporarily change uid to appId" into sc-dev am: 9bcaabb91c -s ours
am skip reason: Merged-In Iadec66344d88bd80170cd5441270b768cdbe0917 with SHA-1 0433dd20b7 is already in history

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

Change-Id: I62d71d1ca1e9ce5b007542cfd21ead5239537cc4
2021-07-26 08:10:38 +00:00
Treehugger Robot
40c0c92867 [automerger skipped] Use appId for looking up allowed on restricted networks uids list am: 3c42fedeb5 -s ours
am skip reason: Merged-In I04fe3a77464d4cb02e7d53026f8f9a10bd0829e1 with SHA-1 25094906ff is already in history

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

Change-Id: I6978fce1b806ba94d38bf25d86fa482505fc5907
2021-07-26 08:10:33 +00:00
Paul Hu
9bcaabb91c Merge "Temporarily change uid to appId" into sc-dev 2021-07-26 07:55:56 +00:00
markchien
911cf8fecd Add TetheringPrivilegedTests to postsubmit
Also ignore DadProxyTest before S because it is only enabled from S.

To using ignore test rule, replace AndroidJunit with DevSdkIgnoreRunner.
It is fine because the we don't use the test UI (e.g. running test in UI
thread).

Test: atest TetheringPrivilegedTests
Change-Id: I701ee877520f78ded2394adbae1f4d9dd612d700
2021-07-26 02:17:19 +00:00
paulhu
fa2f7171af Address aosp/1740740 leftover comments
- Use SystemClock.sleep instead.
- Shorten the waiting time.

Bug: 185149952
Test: atest ConnectivityManagerTest#testUidsAllowedOnRestrictedNetworks
Change-Id: I82221a61bdddf6dc8147b3a29c873ca6c8b05e93
2021-07-23 15:20:06 +08:00
Luke Huang
227f003cbe Merge "Modify Nsd{Service,Manager}Test to conform to its change" into sc-dev am: 3c20df39d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15320525

Change-Id: Ifd8002745d97881414c29faa05820328e4833ae6
2021-07-22 03:26:43 +00:00
Treehugger Robot
3c42fedeb5 Use appId for looking up allowed on restricted networks uids list
aosp/1770606 change uid to appId when filling allowed on
restricted networks uids list. So add UserHandle.getAppId() to
ensure that uses appId for looking up the list.

Bug: 192116643
Test: atest FrameworksNetTests
Original-Change: https://android-review.googlesource.com/1773886
Merged-In: I04fe3a77464d4cb02e7d53026f8f9a10bd0829e1
Change-Id: I04fe3a77464d4cb02e7d53026f8f9a10bd0829e1
2021-07-22 03:19:56 +00:00
Luke Huang
3c20df39d0 Merge "Modify Nsd{Service,Manager}Test to conform to its change" into sc-dev 2021-07-22 03:00:35 +00:00
Treehugger Robot
22b3daf4e5 Merge "Use appId for looking up allowed on restricted networks uids list" am: 02d7eb2abe am: 7d0eb2b22a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1773886

Change-Id: I3e65e9b03981ef0e470ab605c57154dfe214b705
2021-07-22 02:56:25 +00:00
Treehugger Robot
7d0eb2b22a Merge "Use appId for looking up allowed on restricted networks uids list" am: 02d7eb2abe
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1773886

Change-Id: I0a853cfa3abfec8588dc0bdc97aef60230206bb8
2021-07-22 02:21:16 +00:00
Treehugger Robot
02d7eb2abe Merge "Use appId for looking up allowed on restricted networks uids list" 2021-07-22 01:48:45 +00:00
Aaron Huang
4e0f5a50d9 [automerger skipped] Move battery unplug command to the beginning of the test am: 9a2f096870 -s ours
am skip reason: Merged-In I08b38d9955c8cbb2d680e268c29368a4c0a7d144 with SHA-1 a3debae1eb is already in history

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

Change-Id: I15813be64ebdbb75ef1ec5eb7709562b4aba19e5
2021-07-21 14:27:50 +00:00
Paul Hu
92c911da01 Change the url in testDownloadWithDownloadManagerDisallowed
In China, "https://www.google.com" will redirect to url
"http://www.google.cn" but cleartext traffic is default disabled
for an app. So the testDownloadWithDownloadManagerDisallowed
would failed by cleartext traffic is not permitted. Thus, change
the url in the test which is reachable in China.

Bug: 192978910
Test: atest HostsideVpnTests#testDownloadWithDownloadManagerDisallowed
Original-Change: https://android-review.googlesource.com/1771008
Merged-In: I992c3240f0e133f5b00468cbe85d1545bcf786b0
Change-Id: I992c3240f0e133f5b00468cbe85d1545bcf786b0
2021-07-21 10:17:38 +00:00
paulhu
25094906ff Use appId for looking up allowed on restricted networks uids list
aosp/1770606 change uid to appId when filling allowed on
restricted networks uids list. So add UserHandle.getAppId() to
ensure that uses appId for looking up the list.

Bug: 192116643
Test: atest FrameworksNetTests
Change-Id: I04fe3a77464d4cb02e7d53026f8f9a10bd0829e1
2021-07-21 17:45:38 +08:00
Luke Huang
952a55c62d Modify Nsd{Service,Manager}Test to conform to its change
Test: atest NsdManagerTest NsdServiceTest
Bug: 191844585
Change-Id: I3cf658498bef5755dcb01127a94fff913b6e6298
Ignore-AOSP-First: To avoid the side effect caused by automerger.
2021-07-21 08:02:26 +00:00
Paul Hu
be402a2c9d Merge "Change the url in testDownloadWithDownloadManagerDisallowed" am: 42cbf4ebab am: ca4a4a1b86
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1771008

Change-Id: I8544d24607cdab4d2e786d3a3c5646909a0e34f5
2021-07-21 07:29:01 +00:00
Aaron Huang
9a2f096870 Move battery unplug command to the beginning of the test
The test failed because the test generated traffic
before the unplug command really done.

The unplug command will eventually have onBattery changed
to true. If the traffic is generated before onBattery changed
to true, then the cellular stats won't be updated. And then,
when BatteryStatsService schedules a sync task to update the
stats which will get no delta because the stats on cellular
has already added to mLastModemNetworkStats. Thus, the test
will finally get failed.

Currently, the battery unplug command is executed after connecting
to cellular network and making sure wifi is disconnected which may
trigger battery stats service schedules sync tasks. If there are
too many tasks need to run, then change onBattery to true would
be later. Thus, move the unplug command to the beginning of the
test and add "dumpsys batterystats --write" which will wait for the
worker to finish the task before continuing. Thus, it can make sure
the batterystats are synced.

Also, the stats will be reset when the devices are unplugging after
the battery was last full or the level is 100, or have gone through
a significant charge. So, enable no-auto-reset to avoid the stats
getting reset during the test.

Bug: 192808200
Test: atest CtsNetTestCases:BatteryStatsManagerTest
Original-Change: https://android-review.googlesource.com/1769295
Merged-In: I08b38d9955c8cbb2d680e268c29368a4c0a7d144
Change-Id: I08b38d9955c8cbb2d680e268c29368a4c0a7d144
2021-07-21 07:25:55 +00:00
Paul Hu
ca4a4a1b86 Merge "Change the url in testDownloadWithDownloadManagerDisallowed" am: 42cbf4ebab
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1771008

Change-Id: I2546f362d5b338aad56afec489742a0b79ec0ca8
2021-07-21 07:11:49 +00:00
Paul Hu
42cbf4ebab Merge "Change the url in testDownloadWithDownloadManagerDisallowed" 2021-07-21 06:59:15 +00:00
Mark Chien
37600adae5 Merge "Replace throwErrnoException with JNIHelp jniThrowException" am: 7d36391ba4 am: 48c9201d28
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1769765

Change-Id: Iab62b2724d6a1187099b3e9b29ad7e96a0cd924c
2021-07-21 06:44:20 +00:00
Aaron Huang
0d80b279fe Merge "Move battery unplug command to the beginning of the test" am: 7691152162 am: ef23d08eed
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1769295

Change-Id: Ib85a821e6391b6b984d852ca79f2443f418de9c5
2021-07-21 06:44:14 +00:00
Mark Chien
48c9201d28 Merge "Replace throwErrnoException with JNIHelp jniThrowException" am: 7d36391ba4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1769765

Change-Id: I89b051b54202df96192dea0d868acce2b12159c6
2021-07-21 06:36:07 +00:00
Aaron Huang
ef23d08eed Merge "Move battery unplug command to the beginning of the test" am: 7691152162
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1769295

Change-Id: Idc76e3cc8268579f52ab98fbbc17aed34205ce99
2021-07-21 06:36:01 +00:00
Mark Chien
7d36391ba4 Merge "Replace throwErrnoException with JNIHelp jniThrowException" 2021-07-21 06:30:23 +00:00
Aaron Huang
7691152162 Merge "Move battery unplug command to the beginning of the test" 2021-07-21 06:18:08 +00:00
Junyu Lai
d92c090c61 Temporarily disable the test since prebuilt module is not updated am: c42a54f2a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15328937

Change-Id: I46fb4cad43fee89a6d4453c84db867cfc6374493
2021-07-21 03:04:50 +00:00
Junyu Lai
4e02bc437b [automerger skipped] Consider NetworkOffer is unneeded if it cannot satisfy the request am: 135f50679f -s ours
am skip reason: Merged-In Ie3ea59f980c3767782b8e6b03e401c02f664f9bd with SHA-1 dc3a7a39d4 is already in history

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

Change-Id: Ief6154e012e61ca879674eee8d664bcaf80d495d
2021-07-21 03:04:47 +00:00
Chiachang Wang
58644b1f70 Remove DISCONNECTING check from handleReportNetworkConnectivity
ConnectivityService doesn't use it, and the NetworkAgent API
never set it. This case does not happen in pratice, so remove
the check.

Bug: 192611346
Test: atest FrameworksNetTests
Change-Id: I1f114c9b65050527378ee73bc86e4cda8868bca9
2021-07-21 10:28:54 +08:00
Aaron Huang
a3debae1eb Move battery unplug command to the beginning of the test
The test failed because the test generated traffic
before the unplug command really done.

The unplug command will eventually have onBattery changed
to true. If the traffic is generated before onBattery changed
to true, then the cellular stats won't be updated. And then,
when BatteryStatsService schedules a sync task to update the
stats which will get no delta because the stats on cellular
has already added to mLastModemNetworkStats. Thus, the test
will finally get failed.

Currently, the battery unplug command is executed after connecting
to cellular network and making sure wifi is disconnected which may
trigger battery stats service schedules sync tasks. If there are
too many tasks need to run, then change onBattery to true would
be later. Thus, move the unplug command to the beginning of the
test and add "dumpsys batterystats --write" which will wait for the
worker to finish the task before continuing. Thus, it can make sure
the batterystats are synced.

Also, the stats will be reset when the devices are unplugging after
the battery was last full or the level is 100, or have gone through
a significant charge. So, enable no-auto-reset to avoid the stats
getting reset during the test.

Bug: 192808200
Test: atest CtsNetTestCases:BatteryStatsManagerTest
Change-Id: I08b38d9955c8cbb2d680e268c29368a4c0a7d144
2021-07-21 02:14:03 +08:00
Treehugger Robot
0305762d6c Merge changes I6e6b40b0,I6a0d93e0,Ie26f6e52 am: 1004c23b35 am: ef7274ca97
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1772430

Change-Id: Ib1c4033e9416f3295529b75ae3e6de8e0e105425
2021-07-20 15:08:39 +00:00
Remi NGUYEN VAN
d1a4e1b4c4 Merge "Bump Tethering apex version code for S" am: 8b3213f38e am: 8ea56369dc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1768350

Change-Id: I702d805bd124b592ff1c44362872837b530a3fc9
2021-07-20 15:08:33 +00:00
Remi NGUYEN VAN
8dbbe19d37 [automerger skipped] Bump Tethering apex version code for R am: 4d535a4e51 -s ours
am skip reason: Merged-In Ia3d5f2201ce67308df8e2689f6c99e28049a4877 with SHA-1 997838cf13 is already in history

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

Change-Id: Id8222cd6629a3ca36c678dbd9d5f38c889311c6b
2021-07-20 15:08:27 +00:00
Treehugger Robot
ef7274ca97 Merge changes I6e6b40b0,I6a0d93e0,Ie26f6e52 am: 1004c23b35
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1772430

Change-Id: I5283354f545ef3f9b01f9327e2558314aab1f8f0
2021-07-20 14:56:44 +00:00
Remi NGUYEN VAN
8ea56369dc Merge "Bump Tethering apex version code for S" am: 8b3213f38e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1768350

Change-Id: I04242193776c2a35a6bfc91a4c966a52a30aaceb
2021-07-20 14:56:34 +00:00
Remi NGUYEN VAN
4d535a4e51 Bump Tethering apex version code for R
The version code in the manifest is only used for development
builds, as release builds dynamically replace it.

Tethering should have been using 309999900 during S development. That
version was used in many downstream branches, so make it consistent so
it can be bumped for S in all branches.

Bug: 193853555
Change-Id: Ia0e4edaa4fce24e9600fa1d47445b5109d8ee51e
Test: m com.google.android.tethering, check version code
Merged-In: Ia3d5f2201ce67308df8e2689f6c99e28049a4877
Merged-In: I0d4bd06e79adedbf582d2fed551d9f1bde521fd1
Merged-In: Ie3a058b904cb2e3704c3a0725c8f720f81bb235e
2021-07-20 13:18:12 +00:00
Treehugger Robot
1004c23b35 Merge changes I6e6b40b0,I6a0d93e0,Ie26f6e52
* changes:
  Revert "[CTT-5] Stop update TCP conntrack entry timeout"
  Revert "[CTT-6] Update TCP conntrack entry timeout while adding rules"
  Revert "[CTT-7] Delete the rules while half-closing tcp state entered"
2021-07-20 10:49:18 +00:00