Commit Graph

42816 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
96019d9353 Merge "Do not apply jarjar rules on intermediate libs" am: c1e68abd6f am: 4972bf1971
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1778569

Change-Id: I4bf35535002bc1ec90913a941923f9c6e0a1c72b
2021-08-03 08:19:31 +00:00
Remi NGUYEN VAN
4972bf1971 Merge "Do not apply jarjar rules on intermediate libs" am: c1e68abd6f
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1778569

Change-Id: Iab23155e5e5c98e2933d142fe0ccde2a060c5eda
2021-08-03 08:06:48 +00:00
Remi NGUYEN VAN
c1e68abd6f Merge "Do not apply jarjar rules on intermediate libs" 2021-08-03 07:50:29 +00:00
Treehugger Robot
b8b59b96b6 [automerger skipped] Merge "Mock DisplayMetrics in NotificationManagerTest" am: b1263d0363 am: 79f077a0ea -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/+/1784388

Change-Id: I882d4e5093b83145ef743c120ca67c7d55c31d8a
2021-08-03 05:28:52 +00:00
Treehugger Robot
79f077a0ea Merge "Mock DisplayMetrics in NotificationManagerTest" am: b1263d0363
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1784388

Change-Id: I24c16d69009edbf448e05b526b1a6d39068b8fb9
2021-08-03 05:19:48 +00:00
Treehugger Robot
b1263d0363 Merge "Mock DisplayMetrics in NotificationManagerTest" 2021-08-03 05:09:14 +00:00
Treehugger Robot
e89c417ce3 Merge "Merge NetdServiceMonitor into NetdMonitor." am: 44021f4a17 am: 7a1dfa1238
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1767648

Change-Id: Ia6d652a9aa23ade3f9d24fef9f05676549fb1d89
2021-08-02 16:37:56 +00:00
Treehugger Robot
7a1dfa1238 Merge "Merge NetdServiceMonitor into NetdMonitor." am: 44021f4a17
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1767648

Change-Id: I0a695f1b57a8c45cafcdb156c6dca0f9fc02e87f
2021-08-02 16:25:18 +00:00
Treehugger Robot
44021f4a17 Merge "Merge NetdServiceMonitor into NetdMonitor." 2021-08-02 16:09:16 +00:00
Remi NGUYEN VAN
0015f04ec7 Do not apply jarjar rules on intermediate libs
Using jarjar on intermediate libraries causes issues when they are
combined with other libraries that use different jarjar rules, as the
resulting binary may contain multiple incompatible copies of the
classes. Instead, jarjar should be used on the final artifact, after
combining the libraries.

Ensure NetworkStackJarJarRules is not applied on intermediate libraries
like TetheringIntegrationTestsLib, but instead apply it on
TetheringIntegrationTests or CtsTetheringTest.

Bug: 192535368
Test: atest TetheringCoverageTests TetheringIntegrationTests \
          CtsTetheringTest
Change-Id: I248a533651984de81f676336c0e74e3788610bbb
2021-08-02 19:13:09 +09:00
Remi NGUYEN VAN
a944e70daa Mock DisplayMetrics in NotificationManagerTest
DisplayMetrics are used in some downstream branches and need to be
mocked. This avoids merge conflicts in NetworkNotificationManagerTest.

Partial cherry-pick of change IDs:
I35d28c8df341dbbac2774026c6ca749e296c0482
I1aeed1c79e4a829d8829eb08224f9b21fafc50fe

Test: atest NetworkNotificationManagerTest
Bug: 176239013
Merged-In: I3c2563d4ae4e3715d0c6270344ba8f7ef067872f
Change-Id: I118ec1af615aef36293bf0b480389f766122ccab
2021-08-02 19:03:15 +09:00
Aaron Huang
263f8c6328 [automerger skipped] Add INTERACT_ACROSS_USERS_FULL to test for setCurrentProxyScriptUrl am: d9639a9bf4 -s ours
am skip reason: Merged-In I2ddff09b4c9cda1e7c5f3566662ba9cc07fffaae with SHA-1 ac8c47eef6 is already in history

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

Change-Id: I97df1e645a2787b7c2333260df5572b2ef474446
2021-07-30 10:16:06 +00:00
Treehugger Robot
0f9aa8de01 Merge "Force-reconnect wifi (and cell) after disabling airplane mode" am: 8a9562f2c4 am: 2c68feb46a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1777925

Change-Id: Ia4d5d704ef6c398ffb9a69cbc85a10a0fff5beb8
2021-07-30 08:32:31 +00:00
Treehugger Robot
2c68feb46a Merge "Force-reconnect wifi (and cell) after disabling airplane mode" am: 8a9562f2c4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1777925

Change-Id: I5cb77a2b4ee6d482edd8640ed10f2c057dc3d2f1
2021-07-30 08:17:02 +00:00
Treehugger Robot
8a9562f2c4 Merge "Force-reconnect wifi (and cell) after disabling airplane mode" 2021-07-30 08:02:13 +00:00
Remi NGUYEN VAN
9ac0093c64 Force-reconnect wifi (and cell) after disabling airplane mode
Wifi is not guaranteed to connect by just disabling airplane mode
or turning on wifi. Use ensureWifiConnected in the test to force
the test to reconnect to its access point.

Bug: 194413134
Change-Id: I82540a3c6fa1d50ffa39e925bdb3d214876e2083
Test: atest ConnectivityManagerTest
2021-07-30 15:36:51 +09:00
Aaron Huang
d9639a9bf4 Add INTERACT_ACROSS_USERS_FULL to test for setCurrentProxyScriptUrl
If the test passes uid from another user which requires
INTERACT_ACROSS_USERS_FULL permission to bind service.

Bug: 192114565
Test: atest CtsNetTestCases:PacProxyManagerTest
Original-Change: https://android-review.googlesource.com/1755050
Merged-In: I2ddff09b4c9cda1e7c5f3566662ba9cc07fffaae
Change-Id: I2ddff09b4c9cda1e7c5f3566662ba9cc07fffaae
2021-07-30 05:32:00 +00:00
Aaron Huang
ac3b73a3b7 Merge "Add INTERACT_ACROSS_USERS_FULL to test for setCurrentProxyScriptUrl" am: d8944c9e7b am: f831779307
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1755050

Change-Id: I908b6534034519f55a0341ae5b087e054b26d267
2021-07-29 11:51:59 +00:00
Aaron Huang
f831779307 Merge "Add INTERACT_ACROSS_USERS_FULL to test for setCurrentProxyScriptUrl" am: d8944c9e7b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1755050

Change-Id: I1ff8c3618c33c83c3a2459443cbe4809eeac3808
2021-07-29 11:40:38 +00:00
Aaron Huang
d8944c9e7b Merge "Add INTERACT_ACROSS_USERS_FULL to test for setCurrentProxyScriptUrl" 2021-07-29 11:24:54 +00:00
paulhu
c9ebbd1f88 Merge NetdServiceMonitor into NetdMonitor.
- This is a no-op refactor for reducing duplicated code.
- Add a global NetdMonitor which can use for every test.
- Statically import INetd permissions.

Bug: 189705071
Test: atests FrameworksNetTests
Change-Id: I78f4b46cce16ea7e25b67cf2e9470cb09f1c3e75
2021-07-29 08:33:57 +00:00
Remi NGUYEN VAN
6a0a33dcf3 Remove hidden ArrayUtils usage in TetheringTest am: 3dfafbb516 am: 53b6370ec6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1779756

Change-Id: I715be738618531ae541db589255129149cf4b306
2021-07-29 07:40:07 +00:00
Remi NGUYEN VAN
53b6370ec6 Remove hidden ArrayUtils usage in TetheringTest am: 3dfafbb516
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1779756

Change-Id: Ibf6c0bc564482191e5932a71c1f36248c8053593
2021-07-29 07:16:54 +00:00
Chalard Jean
4ce5e17bcd [automerger skipped] Merge "Fix a possible system server crash" into sc-dev am: 63fd8aebbd -s ours
am skip reason: Merged-In I82a28c37450146838410bf5a059aac295a985fca with SHA-1 5bcc838f4e is already in history

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

Change-Id: I92fbf4ceca99dbe5679ce039ad524ffc56a87c51
2021-07-28 08:08:52 +00:00
Remi NGUYEN VAN
3dfafbb516 Remove hidden ArrayUtils usage in TetheringTest
Use CollectionUtils instead, which avoids using a hidden API.

Avoiding hidden API usage in tests is good in general, but this also
helps avoid jarjar problems where the com.android.internal.util package
is jarjared to some other package as some of its classes are included
in the module, and ArrayUtils cannot be found in the renamed package.

Bug: 192535368
Test: atest TetheringTest
Change-Id: I54dc8f6429d132a953ab1a674fe349fba4335936
2021-07-28 17:00:20 +09:00
Chalard Jean
63fd8aebbd Merge "Fix a possible system server crash" into sc-dev 2021-07-28 07:46:06 +00:00
Aaron Huang
ac8c47eef6 Add INTERACT_ACROSS_USERS_FULL to test for setCurrentProxyScriptUrl
If the test passes uid from another user which requires
INTERACT_ACROSS_USERS_FULL permission to bind service.

Bug: 192114565
Test: atest CtsNetTestCases:PacProxyManagerTest
Change-Id: I2ddff09b4c9cda1e7c5f3566662ba9cc07fffaae
2021-07-28 13:51:44 +08:00
Chalard Jean
0bad224c44 Fix a possible system server crash
The scenario is as follows : an app registers a network callback,
then unregisters it and dies immediately after. In this scenario,
the system server will receive a notification of the binder death
and enqueue a call to handleRemoveNetworkRequest. If the callback
unregister message has been process first, this call would result
in unlinkToDeath being called twice on the same Binder, crashing.
This patch fixes the problem by using handleReleaseNetworkRequest
instead of Remove, which looks up the NRI in a map on the handler
thread before calling Remove, returning without doing anything if
the NRI has already been removed.

Test: ConnectivityServiceTest
Test: New test for this
Bug: 194394697
Merged-In: I82a28c37450146838410bf5a059aac295a985fca
Change-Id: Iddab205cf2754d326be816e6e8e92c2cc0b95771
(cherry picked from commit d79bd5c622)
2021-07-28 04:56:19 +00:00
TreeHugger Robot
a542e19999 [automerger skipped] Merge "Update Tethering development module version numbers to 319999900" into sc-dev am: 5e0a824bb5 -s ours
am skip reason: Merged-In Ib8905a641780bed490a38327facee4a76e7770a3 with SHA-1 1d6e7d5117 is already in history

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

Change-Id: I66f7f31a0d6808f7a3d01034d17e6fc9cd58b819
2021-07-28 04:25:37 +00:00
TreeHugger Robot
5e0a824bb5 Merge "Update Tethering development module version numbers to 319999900" into sc-dev 2021-07-28 04:04:07 +00:00
Chiachang Wang
750b190d08 Merge "Retry and ignore ConcurrentModificationException" am: 93bda73970 am: 8a47dfb768
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1772444

Change-Id: I1e449a74117b45fe752decdc02ad3966ded36ef2
2021-07-27 09:35:51 +00:00
Chiachang Wang
8a47dfb768 Merge "Retry and ignore ConcurrentModificationException" am: 93bda73970
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1772444

Change-Id: Iffac4efceaac6b8d27b794c638ecb3358aeeff0a
2021-07-27 09:18:12 +00:00
Chiachang Wang
93bda73970 Merge "Retry and ignore ConcurrentModificationException" 2021-07-27 09:02:56 +00:00
Chiachang Wang
eb25674b5c Retry and ignore ConcurrentModificationException
The flaky callstack shows that it hits the exception in the
initialization of HashSet. The mNetworkRequests is accessed in
the ConnectivityService handler thread except dump(). The
ConcurrentModificationException should not happen in the other
flow. Thus, retry to get the current requests when the dump()
hits the ConcurrentModificationException to prevent flaky test.

Bug: 188373832
Test: atest ConnectivityServiceTest#testDumpDoesNotCrash\
      --iteration 100
Change-Id: I9625919faf947c9488764b92093ed8105271c927
2021-07-27 15:13:52 +08:00
Sudheer Shanka
35c7136ded Merge "Verify apps cannot receive ACTION_SNOOZE_WARNING broadcast." into sc-dev am: 69fbdff0ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/14824710

Change-Id: I44f18fc11d7113dec10f8cbd3b18fe7e1f97554f
2021-07-27 05:27:20 +00:00
Sudheer Shanka
69fbdff0ed Merge "Verify apps cannot receive ACTION_SNOOZE_WARNING broadcast." into sc-dev 2021-07-27 05:13:23 +00:00
Chalard Jean
0a5b0b19e5 Merge "Fix a possible system server crash" am: 51176d0a67 am: d79bd5c622
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1771187

Change-Id: Id71b3d6e530a053b1950ed9cecbf74a83b36b4e8
2021-07-27 05:12:15 +00:00
Chalard Jean
d79bd5c622 Merge "Fix a possible system server crash" am: 51176d0a67
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1771187

Change-Id: Iddab205cf2754d326be816e6e8e92c2cc0b95771
2021-07-27 04:54:52 +00:00
Chalard Jean
51176d0a67 Merge "Fix a possible system server crash" 2021-07-27 04:37:43 +00:00
Chalard Jean
5bcc838f4e Fix a possible system server crash
The scenario is as follows : an app registers a network callback,
then unregisters it and dies immediately after. In this scenario,
the system server will receive a notification of the binder death
and enqueue a call to handleRemoveNetworkRequest. If the callback
unregister message has been process first, this call would result
in unlinkToDeath being called twice on the same Binder, crashing.
This patch fixes the problem by using handleReleaseNetworkRequest
instead of Remove, which looks up the NRI in a map on the handler
thread before calling Remove, returning without doing anything if
the NRI has already been removed.

Test: ConnectivityServiceTest
Test: New test for this
Bug: 194394697
Change-Id: I82a28c37450146838410bf5a059aac295a985fca
2021-07-27 04:37:29 +00:00
Chalard Jean
8d83bc0aed Merge "Remove a useless comment" am: c486f0248b am: dcd4438dfa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1777769

Change-Id: Ie372ac7544afa86dd6c8f1298974e307e76f08b3
2021-07-27 03:25:33 +00:00
Chalard Jean
dcd4438dfa Merge "Remove a useless comment" am: c486f0248b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1777769

Change-Id: Ie0e10e4d2f9500271cd83ef8498c5d13d8d338b0
2021-07-27 03:12:56 +00:00
Chalard Jean
c486f0248b Merge "Remove a useless comment" 2021-07-27 02:59:41 +00:00
Chalard Jean
f126170e98 Remove a useless comment
b/145383354 is obsolete and this works as is (or we'd have found
out by now). Also min SDK version is set in the bp file and
would be overridden anyway.

Test: comment-only change
Change-Id: I6ad3263557ef67aa642672863eed82a312c2ab40
2021-07-27 02:59:11 +00:00
Sudheer Shanka
7bbbdbd4f9 Verify apps cannot receive ACTION_SNOOZE_WARNING broadcast.
Bug: 177931370
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Platform changes related to this are not in AOSP yet.
Change-Id: I6d525c4d88ba01838d51a873251593281b628898
2021-07-26 15:51:09 +00:00
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