Commit Graph

7447 Commits

Author SHA1 Message Date
Paul Hu
6950f29ce0 Merge "Fix flaky testTcpBufferReset" am: 09b6f14675 am: 522aa587b4 am: 14792361e1
am: be9cb6dd88

Change-Id: I807107d076835032a7eb2684c362f773688c6a92
2019-08-30 09:56:44 -07:00
Paul Hu
be9cb6dd88 Merge "Fix flaky testTcpBufferReset" am: 09b6f14675 am: 522aa587b4
am: 14792361e1

Change-Id: I1bc614bda266be290dc5f85e5bd2b84368afd6f0
2019-08-30 09:39:44 -07:00
Paul Hu
14792361e1 Merge "Fix flaky testTcpBufferReset" am: 09b6f14675
am: 522aa587b4

Change-Id: I08452036ddfc3bc7f155c9fa0247288197f2e3ae
2019-08-30 09:30:51 -07:00
Paul Hu
522aa587b4 Merge "Fix flaky testTcpBufferReset"
am: 09b6f14675

Change-Id: Ia344cb1a8c0be07a62eac98117911b6cdb329525
2019-08-30 09:19:42 -07:00
Paul Hu
09b6f14675 Merge "Fix flaky testTcpBufferReset" 2019-08-30 16:01:45 +00:00
junyulai
c5cabe0545 Merge "Fix LockdownVpnTracker deadlock when resetting legacy Always-On VPN" am: c07aed0fd4 am: bfa8b89ed1 am: 2ffc7b4c01
am: 992209592b

Change-Id: I6b9f7942a456fdf790be2961e5b154be49df3121
2019-08-30 08:58:39 -07:00
Aurimas Liutikas
b812d40d37 Merge "Add missing nullability annotations." into stage-aosp-master am: 9fe20bf048 am: 1224bc8ec2
am: 260b360174

Change-Id: I60c55b6706e8d43121e8b2c7a35efff38668f66b
2019-08-30 08:54:38 -07:00
junyulai
992209592b Merge "Fix LockdownVpnTracker deadlock when resetting legacy Always-On VPN" am: c07aed0fd4 am: bfa8b89ed1
am: 2ffc7b4c01

Change-Id: Idb5a89d644cedfda1f0e057dab6ee5d44726903a
2019-08-30 08:48:46 -07:00
Aurimas Liutikas
260b360174 Merge "Add missing nullability annotations." into stage-aosp-master am: 9fe20bf048
am: 1224bc8ec2

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

Change-Id: Ia5bcd39c177c650a4e0174fc69d5078bc12b9e4c
2019-08-30 08:40:14 -07:00
Aurimas Liutikas
1224bc8ec2 Merge "Add missing nullability annotations." into stage-aosp-master
am: 9fe20bf048

Change-Id: Ic9ea2b9840fbb678bbb6ab77038415581feba918
2019-08-30 08:35:52 -07:00
junyulai
bfa8b89ed1 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
9fe20bf048 Merge "Add missing nullability annotations." into stage-aosp-master 2019-08-30 15:19:45 +00:00
paulhu
22e2195a8a 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
0c27ddf71b 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
f12ae468ae Merge "Run callbacks on ConnectivityService thread" am: 08e1dae42f am: 904ee8f635 am: 11e0de0f30
am: 33d70e8fbd

Change-Id: I8ada7ccf94e0ade83c0d810daba9703da60a6f59
2019-08-30 04:05:18 -07:00
Remi NGUYEN VAN
33d70e8fbd Merge "Run callbacks on ConnectivityService thread" am: 08e1dae42f am: 904ee8f635
am: 11e0de0f30

Change-Id: I12d7b8fca85502807288bba03417f2ceb0c9f533
2019-08-30 03:53:46 -07:00
Remi NGUYEN VAN
11e0de0f30 Merge "Run callbacks on ConnectivityService thread" am: 08e1dae42f
am: 904ee8f635

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

Change-Id: I7a8d035ec7453c5351eb2646c631c19964cb0f88
2019-08-30 03:36:26 -07:00
Treehugger Robot
08e1dae42f Merge "Run callbacks on ConnectivityService thread" 2019-08-30 10:18:28 +00:00
Aurimas Liutikas
07be422126 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
8fae993514 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
96521fb87d 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
eea2b12014 Merge changes I69cdbb16,I6975e0b7 am: d889cb5098 am: c3a98bbd65 am: 16b3189142
am: 163106855c

Change-Id: I77ca7b17bea79dee5156839d1164b0fc78b31fe5
2019-08-27 04:12:45 -07:00
Lorenzo Colitti
163106855c Merge changes I69cdbb16,I6975e0b7 am: d889cb5098 am: c3a98bbd65
am: 16b3189142

Change-Id: Id2ef4273b32f804f2a5b935fe9a9d59424baa85a
2019-08-27 03:58:57 -07:00
Lorenzo Colitti
16b3189142 Merge changes I69cdbb16,I6975e0b7 am: d889cb5098
am: c3a98bbd65

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

Change-Id: I3c8ddf7809a0d443587c1c4c06ef56ac302fc80f
2019-08-27 03:31:02 -07:00
Paul Hu
2a78a2a904 Merge "Add SocketUtils CTS tests am: a60f654b1e" into qt-dev-plus-aosp am: 364c77f92e
am: 247abfc850

Change-Id: Ib9a37cb7def991896fba61fbefe61eb8b583a1fb
2019-08-26 14:01:10 -07:00
Paul Hu
e0d431f11d Merge "Add SocketUtils CTS tests am: a60f654b1e am: 8d273c0606" into qt-r1-dev-plus-aosp
am: f5f95fce12

Change-Id: I26b15368b078084158ad91df5d26cea93aff8cd4
2019-08-26 13:53:50 -07:00
Paul Hu
247abfc850 Merge "Add SocketUtils CTS tests am: a60f654b1e" into qt-dev-plus-aosp
am: 364c77f92e

Change-Id: I99307d7aeb0e8c96de51e53a5bc373e570715860
2019-08-25 20:39:10 -07:00
Paul Hu
77d701610e Add SocketUtils CTS tests am: a60f654b1e
am: 8d273c0606

Change-Id: I83abe9535018a161241c4d57f69960254f310c17
2019-08-25 20:33:52 -07:00
Paul Hu
47da8b0b36 Add SocketUtils CTS tests
am: a60f654b1e

Change-Id: I1cf2c12592f4a43a31f1e91c7a4bd933107d4f70
2019-08-25 20:21:56 -07:00
Paul Hu
8d273c0606 Add SocketUtils CTS tests
am: a60f654b1e

Change-Id: I92a6b3e5cb1fa993dfaeacb442cbf6b401dd5996
2019-08-25 20:21:52 -07:00
wangmingming1
478ba7a6d9 notify netd about uid internet permission changes when package replaced
1. If a previous version of an app doesn't declare internet permission;
2. The User upgraded it to a new version and the new one does declare the
internet permission;
3. The new app are not allowed to access the internet until next boot

Bug: 137864893
Test: Manual, just make sure the onPackageChanged would be executed on package changes
Change-Id: I69cdbb16a027a9c4e974b32371b1f64a23a51a23
Signed-off-by: wangmingming1 <wangmingming1@xiaomi.com>
2019-08-26 09:30:59 +09:00
Oscar Shu
8841a3a1a1 Merge "avoid generating reserved local MACs" am: 464e1b5e6f am: 6fcb2696cd am: 4f05f46f13
am: ddc3459236

Change-Id: Ib6e9917c555ab4ef5769aaca1ef6987dfbc185c1
2019-08-23 22:03:56 -07:00
Oscar Shu
ddc3459236 Merge "avoid generating reserved local MACs" am: 464e1b5e6f am: 6fcb2696cd
am: 4f05f46f13

Change-Id: Icce1e14fae4293d747d0f9a57c99bb52fee31ba0
2019-08-23 03:14:04 -07:00
Oscar Shu
6fcb2696cd Merge "avoid generating reserved local MACs"
am: 464e1b5e6f

Change-Id: Ia6d0eb0c5e8101d9c4b4bc63de79157f7d1c2284
2019-08-23 02:24:15 -07:00
Paul Hu
a60f654b1e Add SocketUtils CTS tests
Test APIs below:
makeNetlinkSocketAddress(int, int)
makePacketSocketAddress(short, int)
makePacketSocketAddress(int, byte[])
closeSocket(java.io.FileDescriptor)

Bug:129200596
Test: atest FrameworksNetTests
      atest CtsNetTestCases --instant
Merged-In: I36252fdf516cf4a9d4506b615cdb38f5413739e5
(cherry picked from commit 93a53224d3a1cd6fc1de7d94955e03116b744e4a)

Change-Id: I0963acaf00c5bdd93db0503c426f190f409ca076
2019-08-23 02:13:40 +00:00
Oscar Shu
464e1b5e6f Merge "avoid generating reserved local MACs" 2019-08-21 17:45:00 +00:00
Android Build Merger (Role)
613aa66e20 Merge "[automerger skipped] Merge "Get resource based on subId for multi-SIM" into qt-r1-dev am: 559e7a3de1 am: c3c41babff -s ours am skip reason: change_id Ib5b085d97103889600773d269e03b939c29ca47d with SHA1 5fed8d9ee3 is in history" into qt-qpr1-dev-plus-aosp 2019-08-17 14:28:18 +00:00
Chiachang Wang
bd49c5e8eb [automerger skipped] Merge "Get resource based on subId for multi-SIM" into qt-r1-dev am: 559e7a3de1
am: c3c41babff -s ours
am skip reason: change_id Ib5b085d97103889600773d269e03b939c29ca47d with SHA1 5fed8d9ee3 is in history

Change-Id: If85845ae5b8af10afdb9422d92cdbf599b294d2f
2019-08-17 07:27:18 -07:00
Chiachang Wang
5048e4a80d [automerger skipped] Merge "Get resource based on subId for multi-SIM" into qt-r1-dev
am: 559e7a3de1 -s ours
am skip reason: change_id Ib5b085d97103889600773d269e03b939c29ca47d with SHA1 5fed8d9ee3 is in history

Change-Id: I405bb51787bce13441aa4c3b985ef2b92df18826
2019-08-17 07:17:49 -07:00
xshu
8438a85683 avoid generating reserved local MACs
Avoid generating WifiInfo.DEFAULT_MAC_ADDRESS as a randomized MAC
address since it's being used for another purpose.

Bug: 137796328
Test: atest MacAddressTest
Change-Id: Ia7beef0d0af5d7b39845e662cd343d81aef97702
2019-08-16 10:20:22 -07:00
Chiachang Wang
0dc044aac7 Get resource based on subId for multi-SIM
The resource loading is done based on the last SIM to come up
which is not a deterministic design. Thus, update the way to get
the resource based on the subId.

Test: atest FrameworksNetTests
Test: manually test with avoid bad wifi feature supported sim
Bug: 138956509
Change-Id: Ib5b085d97103889600773d269e03b939c29ca47d
Merged-In: Ib5b085d97103889600773d269e03b939c29ca47d
(cherry picked from commit 5e994ea02c7a820543f3726186240548676f4b4e)
2019-08-14 12:15:56 +00:00
Chiachang Wang
115b77593c Merge "Get resource based on subId for multi-SIM" am: 55752cf8d4 am: 85ff8a6902
am: 2b7f2fbb5b

Change-Id: I1e69a49c88f6123f735075934f2f2e08f15f2bff
2019-08-14 04:54:59 -07:00
Chiachang Wang
85ff8a6902 Merge "Get resource based on subId for multi-SIM"
am: 55752cf8d4

Change-Id: I020c2546fa4432d05cf27b20fdb1943508aac671
2019-08-14 04:30:57 -07:00
Chiachang Wang
5fed8d9ee3 Get resource based on subId for multi-SIM
The resource loading is done based on the last SIM to come up
which is not a deterministic design. Thus, update the way to get
the resource based on the subId.

Test: atest FrameworksNetTests
Test: manually test with avoid bad wifi feature supported sim
Bug: 138956509
Change-Id: Ib5b085d97103889600773d269e03b939c29ca47d
2019-08-14 13:56:37 +08:00
Remi NGUYEN VAN
b0cbc5d051 Merge "Extract test utilities for ConnectivityService" am: ecaff61c4b am: 9e23af5f90
am: 6d34ffb4e6

Change-Id: Ib760ef922a440d54bab8c1647d8444ab2a717094
2019-08-06 15:57:04 -07:00
Remi NGUYEN VAN
9e23af5f90 Merge "Extract test utilities for ConnectivityService"
am: ecaff61c4b

Change-Id: I0ac2a480f961bb6fd1d83dedad6a7942ee03858f
2019-08-06 14:58:43 -07:00
Treehugger Robot
ecaff61c4b Merge "Extract test utilities for ConnectivityService" 2019-08-06 11:04:36 +00:00