Commit Graph

7318 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
85d491a760 Merge "Add NetIdManagerTest" am: 4339cf3402 am: b050eabb3f am: 309e2f539b
am: ffa89f6e63

Change-Id: Id54bf8a7b8506d62b839a42dd4ddd8c30185b547
2019-09-05 00:36:57 -07:00
Remi NGUYEN VAN
ffa89f6e63 Merge "Add NetIdManagerTest" am: 4339cf3402 am: b050eabb3f
am: 309e2f539b

Change-Id: Iea5c3d1ab35678edf25f103e54784ce8ab49ca12
2019-09-05 00:22:50 -07:00
Remi NGUYEN VAN
309e2f539b Merge "Add NetIdManagerTest" am: 4339cf3402
am: b050eabb3f

Change-Id: I47250a4593af4d803942e0ac736b7c0625b6ee70
2019-09-05 00:08:58 -07:00
Remi NGUYEN VAN
b050eabb3f Merge "Add NetIdManagerTest"
am: 4339cf3402

Change-Id: Ifbebb446601fcbbdf91fff48dc66ad173a6ecc7c
2019-09-04 23:54:58 -07:00
Remi NGUYEN VAN
0e0a488d54 Merge "Add ConnectivityServiceIntegrationTest" am: 324d724fd7 am: 71df7f558a am: eb75b11ce8
am: fde640da47

Change-Id: I0fdd3bea8ff31c71e78ba37900382c02b7e4667b
2019-09-04 23:09:44 -07:00
Remi NGUYEN VAN
fde640da47 Merge "Add ConnectivityServiceIntegrationTest" am: 324d724fd7 am: 71df7f558a
am: eb75b11ce8

Change-Id: I256ee5f6bad08b4a6ca5037a80388b478ebff266
2019-09-04 23:01:43 -07:00
Remi NGUYEN VAN
eb75b11ce8 Merge "Add ConnectivityServiceIntegrationTest" am: 324d724fd7
am: 71df7f558a

Change-Id: I78627992846ce9e89abe0d8a9cf512c07552e4d2
2019-09-04 22:51:15 -07:00
Remi NGUYEN VAN
71df7f558a Merge "Add ConnectivityServiceIntegrationTest"
am: 324d724fd7

Change-Id: Ib82c5e5aee9e830a0efe8ea6335933237bb33856
2019-09-04 22:41:44 -07:00
Remi NGUYEN VAN
f3ba3cd27b Add NetIdManagerTest
Add a simple test to verify that IDs loop correctly, that they skip used
IDs correctly, and throw when there is no remaining ID.

Test: atest com.android.server.NetIdManagerTest
Change-Id: I4c9518c725156d743286e062fd2eec1423a0459e
2019-09-04 15:57:58 +09:00
Remi NGUYEN VAN
ebe5298d84 Add ConnectivityServiceIntegrationTest
This test exercises the Connectivity <-> NetworkMonitor integration.
This CL only contains a simple test (network validates), but more
generally it sets up a test package that contains both services.jar
classes and NetworkStack classes, and runs NetworkStack components in
another process (using TestNetworkStackService).

ConnectivityServiceIntegrationTest runs in the test process and binds to
TestNetworkStackService to obtain TestNetworkStackConnector and to
NetworkStackInstrumentationService to obtain
NetworkStackInstrumentationConnector. That last connector allows the
test to mock NetworkMonitor HTTP Requests.

Test: atest FrameworksNetIntegrationTests
Change-Id: Ieca18e273609044cf6b1870d2f0dba33ca7b38d3
2019-09-04 15:57:47 +09:00
Guang Zhu
b47d2cc5ac Merge "Mark 3 tests as flaky." am: f6c61f329a am: 4416eecc3a am: decf31a759
am: 68b353e187

Change-Id: I284e445e84209f0670ee3733f13f9e12d0f33a04
2019-09-03 15:03:50 -07:00
Guang Zhu
68b353e187 Merge "Mark 3 tests as flaky." am: f6c61f329a am: 4416eecc3a
am: decf31a759

Change-Id: I1af80ae660727f7902e98680c43f03cb7668682a
2019-09-02 12:45:42 -07:00
Guang Zhu
decf31a759 Merge "Mark 3 tests as flaky." am: f6c61f329a
am: 4416eecc3a

Change-Id: I6e33cfdfccbea43eaf36bd6a97098de523e31d33
2019-09-02 12:21:40 -07:00
Guang Zhu
4416eecc3a Merge "Mark 3 tests as flaky."
am: f6c61f329a

Change-Id: Ie1c38e247ccfaa407d35cf6b6e28306d36cdccca
2019-09-02 12:03:12 -07:00
Treehugger Robot
f6c61f329a Merge "Mark 3 tests as flaky." 2019-09-02 18:44:24 +00:00
Guang Zhu
6665297de9 Mark 3 tests as flaky.
Bug: 140306320
Bug: 140305589
Bug: 140305678
Test: apct/net/networking_framework_unit_test
Change-Id: I5a288d7d64b3e95e0025c2c1f4a64ffe85cc3cd6
2019-09-01 21:37:04 -07:00
Aurimas Liutikas
08559f1169 [automerger skipped] Merge "Add missing nullability annotations." am: 79373f74cd -s ours am: 97d561c8fd -s ours am: 1b525c17c8 -s ours
am: 4886b1851b -s ours
am skip reason: change_id I109260842cfc25f06e40694997fcbb4afa02c867 with SHA1 9242b6de9c is in history

Change-Id: I2af5416c9af0f0cda4110d1d9dc5ac8a9d880de1
2019-08-30 12:47:58 -07:00
Aurimas Liutikas
4886b1851b [automerger skipped] Merge "Add missing nullability annotations." am: 79373f74cd -s ours am: 97d561c8fd -s ours
am: 1b525c17c8 -s ours
am skip reason: change_id I109260842cfc25f06e40694997fcbb4afa02c867 with SHA1 9242b6de9c is in history

Change-Id: If5de5ce42bdec77db69dc229a2f5c7367b28a560
2019-08-30 12:33:40 -07:00
Aurimas Liutikas
1b525c17c8 [automerger skipped] Merge "Add missing nullability annotations." am: 79373f74cd -s ours
am: 97d561c8fd -s ours
am skip reason: change_id I109260842cfc25f06e40694997fcbb4afa02c867 with SHA1 9242b6de9c is in history

Change-Id: I729acc32ce9625df646bf0a820f9f4d95a9d60cf
2019-08-30 12:08:42 -07:00
Aurimas Liutikas
97d561c8fd [automerger skipped] Merge "Add missing nullability annotations."
am: 79373f74cd -s ours
am skip reason: change_id I109260842cfc25f06e40694997fcbb4afa02c867 with SHA1 9242b6de9c is in history

Change-Id: I7b2712e4ab3635f94f8257d88f24c20bc68a3ac0
2019-08-30 11:49:09 -07:00
Aurimas Liutikas
79373f74cd Merge "Add missing nullability annotations." 2019-08-30 18:30:39 +00:00
Paul Hu
a1b0c775cb Merge "Fix flaky testTcpBufferReset" am: 97d1b8cec7 am: e8db073053 am: 6435610da3
am: ecc092fb3e

Change-Id: I807107d076835032a7eb2684c362f773688c6a92
2019-08-30 09:56:44 -07:00
Paul Hu
ecc092fb3e Merge "Fix flaky testTcpBufferReset" am: 97d1b8cec7 am: e8db073053
am: 6435610da3

Change-Id: I1bc614bda266be290dc5f85e5bd2b84368afd6f0
2019-08-30 09:39:44 -07:00
Paul Hu
6435610da3 Merge "Fix flaky testTcpBufferReset" am: 97d1b8cec7
am: e8db073053

Change-Id: I08452036ddfc3bc7f155c9fa0247288197f2e3ae
2019-08-30 09:30:51 -07:00
Paul Hu
e8db073053 Merge "Fix flaky testTcpBufferReset"
am: 97d1b8cec7

Change-Id: Ia344cb1a8c0be07a62eac98117911b6cdb329525
2019-08-30 09:19:42 -07:00
Paul Hu
97d1b8cec7 Merge "Fix flaky testTcpBufferReset" 2019-08-30 16:01:45 +00:00
junyulai
05deeefe08 Merge "Fix LockdownVpnTracker deadlock when resetting legacy Always-On VPN" am: c07aed0fd4 am: 2e15c3578a am: 33adb71971
am: 7f497c2bfb

Change-Id: I6b9f7942a456fdf790be2961e5b154be49df3121
2019-08-30 08:58:39 -07:00
Aurimas Liutikas
c64da44393 Merge "Add missing nullability annotations." into stage-aosp-master am: 7958bb6ac8 am: 6b987bef4d
am: c8edfe8a3f

Change-Id: I60c55b6706e8d43121e8b2c7a35efff38668f66b
2019-08-30 08:54:38 -07:00
junyulai
7f497c2bfb Merge "Fix LockdownVpnTracker deadlock when resetting legacy Always-On VPN" am: c07aed0fd4 am: 2e15c3578a
am: 33adb71971

Change-Id: Idb5a89d644cedfda1f0e057dab6ee5d44726903a
2019-08-30 08:48:46 -07:00
Aurimas Liutikas
c8edfe8a3f Merge "Add missing nullability annotations." into stage-aosp-master am: 7958bb6ac8
am: 6b987bef4d

Change-Id: I202951d51820be47b9195734601830553215bdd7
2019-08-30 08:43:01 -07:00
junyulai
33adb71971 Merge "Fix LockdownVpnTracker deadlock when resetting legacy Always-On VPN" am: c07aed0fd4
am: 2e15c3578a

Change-Id: Ia5bcd39c177c650a4e0174fc69d5078bc12b9e4c
2019-08-30 08:40:14 -07:00
Aurimas Liutikas
6b987bef4d Merge "Add missing nullability annotations." into stage-aosp-master
am: 7958bb6ac8

Change-Id: Ic9ea2b9840fbb678bbb6ab77038415581feba918
2019-08-30 08:35:52 -07:00
junyulai
2e15c3578a Merge "Fix LockdownVpnTracker deadlock when resetting legacy Always-On VPN"
am: c07aed0fd4

Change-Id: If5b3f6f1d397d3ac35b509a2e634a60933f2df6c
2019-08-30 08:30:10 -07:00
Aurimas Liutikas
7958bb6ac8 Merge "Add missing nullability annotations." into stage-aosp-master 2019-08-30 15:19:45 +00:00
paulhu
ce03e08054 Fix flaky testTcpBufferReset
If EVENT_NETWORK_INFO_CHANGED was handled after waitForIdle()
method done, this test will be failed due to
INetd#setTcpRWmemorySize() was not executed yet. Instead of
waiting for idle state, it's better to use NetworkCallback to
ensure events completely on ConnectivityService.

Bug: 140206578
Test: atest ConnectivityServiceTest#testTcpBufferReset\
      --generate-new-metrics 500

Change-Id: Iad77415db38038603881d9ebe0e37586b549a45c
2019-08-30 20:21:03 +08:00
junyulai
2bdd029792 Fix LockdownVpnTracker deadlock when resetting legacy Always-On VPN
When resetting legacy Always-On VPN, the intent is handled by
main thread. And it will also initialize VPN shutdown process,
which will cause networkInfo changed event on
ConnectivityService internal thread. These two events need to
hold their corresponding lock and ask for the other one, which
causes the deadlock.

This patch move the event handling to the same thread to prevent
such deadlock, and cleanup some unused variables.

Change-Id: I5b656c0d0381acb4e33409a11f502db9b180296c
Fix: 139122208
Test: atest FrameworksNetTests, manual test
2019-08-30 19:56:59 +08:00
Remi NGUYEN VAN
6fb7791309 Merge "Run callbacks on ConnectivityService thread" am: 1ef61592b8 am: ab507d4e34 am: bb5e40bc49
am: 49d314a21d

Change-Id: I8ada7ccf94e0ade83c0d810daba9703da60a6f59
2019-08-30 04:05:18 -07:00
Remi NGUYEN VAN
49d314a21d Merge "Run callbacks on ConnectivityService thread" am: 1ef61592b8 am: ab507d4e34
am: bb5e40bc49

Change-Id: I12d7b8fca85502807288bba03417f2ceb0c9f533
2019-08-30 03:53:46 -07:00
Remi NGUYEN VAN
bb5e40bc49 Merge "Run callbacks on ConnectivityService thread" am: 1ef61592b8
am: ab507d4e34

Change-Id: I288994ccfdd044453aa818681745b8e69881264a
2019-08-30 03:47:09 -07:00
Remi NGUYEN VAN
ab507d4e34 Merge "Run callbacks on ConnectivityService thread"
am: 1ef61592b8

Change-Id: I7a8d035ec7453c5351eb2646c631c19964cb0f88
2019-08-30 03:36:26 -07:00
Treehugger Robot
1ef61592b8 Merge "Run callbacks on ConnectivityService thread" 2019-08-30 10:18:28 +00:00
Aurimas Liutikas
f02bb2d0d5 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:16:24 +00:00
Aurimas Liutikas
9242b6de9c Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Remi NGUYEN VAN
6f7ef3f258 Run callbacks on ConnectivityService thread
Run MultinetworkPolicyTracker and DataConnectionStats callbacks on the
ConnectivityService handler thread.

Previously the callbacks would be using the SystemServer foreground
thread (Looper.myLooper()), or the broadcast thread for the
MultinetworkPolicyTracker BroadcastReceiver. This is error-prone, can
cause threading issues and makes it difficult to test the components.

Test: atest FrameworksNetTests
Change-Id: I189213dd363004abed294659165bf5430d153bba
2019-08-28 10:10:04 +09:00
Lorenzo Colitti
76891b9e72 Merge changes I69cdbb16,I6975e0b7 am: d889cb5098 am: 5fecd24f17 am: 5b943c34fd
am: 48515fdc8b

Change-Id: I77ca7b17bea79dee5156839d1164b0fc78b31fe5
2019-08-27 04:12:45 -07:00
Lorenzo Colitti
48515fdc8b Merge changes I69cdbb16,I6975e0b7 am: d889cb5098 am: 5fecd24f17
am: 5b943c34fd

Change-Id: Id2ef4273b32f804f2a5b935fe9a9d59424baa85a
2019-08-27 03:58:57 -07:00
Lorenzo Colitti
5b943c34fd Merge changes I69cdbb16,I6975e0b7 am: d889cb5098
am: 5fecd24f17

Change-Id: I6f6458883392a396ff831c6ddd74295e00daae0f
2019-08-27 03:44:40 -07:00
Lorenzo Colitti
5fecd24f17 Merge changes I69cdbb16,I6975e0b7
am: d889cb5098

Change-Id: I3c8ddf7809a0d443587c1c4c06ef56ac302fc80f
2019-08-27 03:31:02 -07:00
Paul Hu
24604c9f38 Merge "Add SocketUtils CTS tests am: 4f4206d56f" into qt-dev-plus-aosp am: 364c77f92e
am: a09c956a1c

Change-Id: Ib9a37cb7def991896fba61fbefe61eb8b583a1fb
2019-08-26 14:01:10 -07:00
Paul Hu
69dfdd247a Merge "Add SocketUtils CTS tests am: 4f4206d56f am: c91dfb967b" into qt-r1-dev-plus-aosp
am: f5f95fce12

Change-Id: I26b15368b078084158ad91df5d26cea93aff8cd4
2019-08-26 13:53:50 -07:00