Commit Graph

6826 Commits

Author SHA1 Message Date
Lorenzo Colitti
cdaf30a0ab [automerger skipped] Merge "Change the icon for the LOGGED_IN notification." into qt-dev
am: 73240e24fd -s ours
am skip reason: change_id I8250236bc4ba251492a6cb9bf23e67666ef860d3 with SHA1 53a20a376c is in history

Change-Id: I0ff820347cd8aa5e66150717d3406d6af5f749f7
2019-05-17 07:14:29 -07:00
Lorenzo Colitti
73240e24fd Merge "Change the icon for the LOGGED_IN notification." into qt-dev 2019-05-17 13:58:09 +00:00
Paul Hu
b16f3dd625 [automerger skipped] Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" into qt-dev
am: 44ff507ec5 -s ours
am skip reason: change_id Ia28eea113e19b9c44998677e5b8093be178a06a3 with SHA1 783bcab955 is in history

Change-Id: I1374882f23cc9676fff5562a35f1057f49f74040
2019-05-17 01:10:25 -07:00
Lorenzo Colitti
c226cca5c9 Merge "Change the icon for the LOGGED_IN notification." am: 8175c6a3a9
am: fce3635550

Change-Id: I9013d2d147979ffc03bc0da6b9a503f8ce623b70
2019-05-17 00:41:51 -07:00
Paul Hu
44ff507ec5 Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" into qt-dev 2019-05-17 06:46:36 +00:00
Lorenzo Colitti
3f4b8d8d4c Change the icon for the LOGGED_IN notification.
This notification is shown when the user has already logged in to
the network, so it should not have a question mark on it.

Fix: 130526201
Test: atest FrameworksNetTests
Test: manually signed in to portal
Change-Id: I8250236bc4ba251492a6cb9bf23e67666ef860d3
Merged-In: I8250236bc4ba251492a6cb9bf23e67666ef860d3
(cherry picked from commit fce363555029b92b1532058555797d6ef1afb09c)
2019-05-17 06:25:09 +00:00
Xin Li
92e848930f [automerger skipped] DO NOT MERGE - Merge pie-platform-release (PPRL.190505.001) into master. am: 4f361df8e4 -s ours
am: 704e63b17e -s ours
am skip reason: subject contains skip directive

Change-Id: Ic4e3df2aa9f8996b10dfc0a596269bd508ae2549
2019-05-16 21:22:38 -07:00
Lorenzo Colitti
8175c6a3a9 Merge "Change the icon for the LOGGED_IN notification." 2019-05-17 04:15:51 +00:00
Lorenzo Colitti
53a20a376c Change the icon for the LOGGED_IN notification.
This notification is shown when the user has already logged in to
the network, so it should not have a question mark on it.

Bug: 130526201
Test: atest FrameworksNetTests
Test: manually signed in to portal
Change-Id: I8250236bc4ba251492a6cb9bf23e67666ef860d3
2019-05-17 09:00:53 +09:00
Xin Li
3630fec854 [automerger skipped] Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master" into stage-aosp-master
am: 00c98116f2 -s ours
am skip reason: subject contains skip directive

Change-Id: Iad8736143771d3baae850bbfc2aef5d78d9ca96a
2019-05-15 18:47:59 -07:00
Xin Li
0a26a1b32b [automerger skipped] DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
am: 6e8b516ac9 -s ours
am skip reason: subject contains skip directive

Change-Id: I428e3fbada5f4715f4934d7e2210e0eef51a0d40
2019-05-15 17:32:18 -07:00
Xin Li
4f361df8e4 DO NOT MERGE - Merge pie-platform-release (PPRL.190505.001) into master.
Bug: 132622481
Change-Id: I8a3d38c16d3de15514e2418d13d61b57b2cfd907
2019-05-15 16:55:34 -07:00
TreeHugger Robot
00c98116f2 Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master" into stage-aosp-master 2019-05-15 23:02:14 +00:00
Xin Li
6e8b516ac9 DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
Bug: 132622481
Change-Id: I7ba1a9999b3a9bac8031dd086fa2632e45404f32
2019-05-15 11:31:45 -07:00
Xiao Ma
d525ba8315 [automerger skipped] Merge "Clean up the arguments annotation and verify items on IpMemoryStoreTest." into qt-dev
am: cfaa8ead59 -s ours
am skip reason: change_id I1db13a48b59d743482436ecf8a20d7f12edd6e1c with SHA1 47fa3fca31 is in history

Change-Id: I206c3efa264a7a8b16f07683c7c1bbf9fb29b426
2019-05-15 09:22:19 -07:00
Xiao Ma
823fb4c732 Clean up the arguments annotation and verify items on IpMemoryStoreTest.
Bug: 131133347
Test: atest FrameworksNetTests

Merged-In: I8ce3bed435fbbb814d71fe48ffd305ff3f947f3f
Merged-In: I1db13a48b59d743482436ecf8a20d7f12edd6e1c
(cherry picked from commit 7567c4ac50508c2bcd38b37fc48b299912a34cf5)

Change-Id: I78024c0e25d812639d1236faa59d383742ae2141
2019-05-15 14:53:42 +00:00
Paul Hu
015344ea65 Ignore NetworkTest when running CtsNetTestCases in instant app mode
Ignore NetworkTest#testBindSocketOfConnectedDatagramSocketThrows
when running CtsNetTestCases in instant app mode due to sockect
cannot bind in instant app mode.

Bug: 123366918
Test: atest CtsNetTestCases --instant
Test: atest FrameworksNetTests

Change-Id: I1e93d4491e3d9e5a095ff4b6169b2f70e7b3b690
Merged-In: Ia28eea113e19b9c44998677e5b8093be178a06a3
Merged-In: I1e93d4491e3d9e5a095ff4b6169b2f70e7b3b690
(cherry picked from commit 73c0d48b14488c93b2f42a1e149e4be8499d3469)
2019-05-15 06:58:27 +00:00
Lorenzo Colitti
8e9a3c66df [automerger skipped] Merge "Clean up the permission control code in framework" into qt-dev
am: 138a94e06c -s ours
am skip reason: change_id I25224c9576f52d2a0a0bd2182325c7aac7b28eb5 with SHA1 58987b21ac is in history

Change-Id: Ia49181982198f2074a11afc881a047f86263699b
2019-05-14 23:49:27 -07:00
Chenbo Feng
e0ab7c88f2 [automerger skipped] Clean up the permission control code in framework
am: 58987b21ac -s ours
am skip reason: change_id I25224c9576f52d2a0a0bd2182325c7aac7b28eb5 with SHA1 cdd3087296 is in history

Change-Id: If4d60807fd1cc312393bf56830f09bddeff7b59f
2019-05-14 23:43:03 -07:00
Lorenzo Colitti
138a94e06c Merge "Clean up the permission control code in framework" into qt-dev 2019-05-15 06:26:52 +00:00
Paul Hu
94b6f19d83 [automerger skipped] Merge "Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission" into qt-dev
am: 53e2a9b0ae -s ours
am skip reason: change_id I1025da29beb53259f57bd9ca5648b32f2847ed4a with SHA1 e6d9de3795 is in history

Change-Id: I0fd395b418475c6b9d8ac7dbd363d43e437d2203
2019-05-14 21:51:21 -07:00
Paul Hu
783bcab955 Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" am: 9f88ea3b3b
am: 93f6dc8ab5

Change-Id: Ia28eea113e19b9c44998677e5b8093be178a06a3
2019-05-14 21:35:43 -07:00
Paul Hu
93f6dc8ab5 Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode"
am: 9f88ea3b3b

Change-Id: I670b9847a2e3b3b794ee4694a0838440cabdc39f
2019-05-14 21:17:33 -07:00
Paul Hu
9f88ea3b3b Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" 2019-05-15 03:42:32 +00:00
Paul Hu
52c1265e6a Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission
Caller should get SecurityException if called
ConnectivityManager#startCaptivePortalApp() w/o
MAINLINE_NETWORK_STACK permission. But now it will not get any
exception and can launch captive portal app successfully.

Bug: 132662433
Test: atest android.net.cts.ConnectivityManagerTest#testStartCaptivePortalApp
      w and w/o MAINLINE_NETWORK_STACK permission
Test: atest FrameworksNetTests NetworkStackTests

Change-Id: Ib70fe6fad107f3e9dce9ce673188c5ce5dc1ad7b
Merged-In: I1025da29beb53259f57bd9ca5648b32f2847ed4a
Merged-In: Ib70fe6fad107f3e9dce9ce673188c5ce5dc1ad7b
(cherry picked from commit 72b3ab18ca302a3117f424a0f0ef6c08897c310e)
2019-05-15 02:09:52 +00:00
Paul Hu
e6d9de3795 Merge "Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission" am: b112d8b907
am: c3c237ceab

Change-Id: I1025da29beb53259f57bd9ca5648b32f2847ed4a
2019-05-14 04:17:29 -07:00
Paul Hu
c3c237ceab Merge "Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission"
am: b112d8b907

Change-Id: I065b5403d2f89d158e76f63c9b125ad30e603633
2019-05-14 04:06:04 -07:00
Paul Hu
b112d8b907 Merge "Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission" 2019-05-14 10:48:48 +00:00
paulhu
d203f7a358 Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission
Caller should get SecurityException if called
ConnectivityManager#startCaptivePortalApp() w/o
MAINLINE_NETWORK_STACK permission. But now it will not get any
exception and can launch captive portal app successfully.

Bug: 132662433
Test: atest android.net.cts.ConnectivityManagerTest#testStartCaptivePortalApp
      w and w/o MAINLINE_NETWORK_STACK permission
Test: atest FrameworksNetTests NetworkStackTests

Change-Id: I61be1b0647f4165665a2d4166311adeac956e0d4
2019-05-14 18:44:16 +08:00
Chenbo Feng
58987b21ac Clean up the permission control code in framework
Delete the unused NetworkManagementService API for set/remove
permissions. Use PERMISSION_NONE to replace NO_PERMISSIONS so the
framework now use the same set of permission constant when communicate
with netd.

Bug: 128944261
Test: PermissionMonitorTest.java

Change-Id: I25224c9576f52d2a0a0bd2182325c7aac7b28eb5
Merged-In: I25224c9576f52d2a0a0bd2182325c7aac7b28eb5
(cherry picked from commit 05887f99c6ca6885db737af2f356023dc6de80a2)
2019-05-13 14:22:58 -07:00
Chenbo Feng
53b36ef72a Merge "Clean up the permission control code in framework" am: 2ecbe8b8b1
am: 3c6d05651b

Change-Id: I1af059171c5d80be7abaee636f012f3b55dac2df
2019-05-13 11:32:59 -07:00
Chenbo Feng
3c6d05651b Merge "Clean up the permission control code in framework"
am: 2ecbe8b8b1

Change-Id: Iff2316f72df4cff56829b281882dc920d63937bd
2019-05-13 11:20:31 -07:00
Treehugger Robot
2ecbe8b8b1 Merge "Clean up the permission control code in framework" 2019-05-13 18:04:50 +00:00
Aaron Huang
b1837d5774 [automerger skipped] Merge "Send message to add/remove NAT-T keepalive packet filter." into qt-dev
am: 31e7bbccb1 -s ours
am skip reason: change_id Ic97ffe9ff5781778efd264460809f5059f0f4230 with SHA1 a8bce09037 is in history

Change-Id: I40a476b7bb8b4cff1107e5786f5da2900ef0462f
2019-05-13 07:52:13 -07:00
junyulai
b0688e2273 [automerger skipped] Merge changes from topic "cleanupkeepalive" into qt-dev
am: c31ccecf6c -s ours
am skip reason: change_id I0481a469ee23231e5f0ab738a06b5e09f6cdb680 with SHA1 fe67da777b is in history

Change-Id: Ib6b1225fa45270974cce121a60e46f49f79e68ec
2019-05-13 07:42:08 -07:00
Junyu Lai
939ad0b125 Merge "Fix concurrent modification exception in KeepaliveTracker" am: 25c06577c9
am: bdf60ad814

Change-Id: I6221bdff630ebef88bfd9d609e31a0f9ede036ad
2019-05-13 03:52:25 -07:00
Aaron Huang
99cfe4eba2 Send message to add/remove NAT-T keepalive packet filter.
Remove definition of TYPE_NATT and TYPE_TCP since the type
can be identified by checking message.obj is an instance of
NattKeepalivePacketData or TcpKeepalivePacketData.
It's more simple and won't have dependency on KeepaliveInfo.

Bug: 33530442
Test: atest FrameworksNetTests
      atest NetworkStackTests

(Clean cherry-pick of aosp/955419)

Change-Id: Ic97ffe9ff5781778efd264460809f5059f0f4230
Merged-In: Ic97ffe9ff5781778efd264460809f5059f0f4230
2019-05-13 18:48:19 +08:00
junyulai
03c60fecda Fix concurrent modification exception in KeepaliveTracker
In aosp/951200, the clean up function delete the item in the
hash map that holds the record while iterating it, where the
list used to iterate the records is backed by the hash map,
so changes to the map are reflected in the list and caused
the concurrent modification exception.

Bug: 132341736
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 300
      2. atest FrameworksNetTests --generate-new-metrics 10

(Clean cherry-pick of aosp/959599)

Change-Id: I9cdfe6f6d11c5400c856cc30a33ff4a44ba9d811
Merged-In: I0481a469ee23231e5f0ab738a06b5e09f6cdb680
2019-05-13 18:44:39 +08:00
Junyu Lai
24bd38cc20 Clean up the keepalive slots when network disconnect
In general, keepalive slots are released after result of
stopping has returned. However, for network disconnect case,
the service side cannot communicate with network agent since
the async channel is broken.

Clean up keepalive slots right after stop in this case.

Bug: 132341736
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 100
      2. atest FrameworksNetTests --generate-new-metrics 10

Change-Id: Id3e4e159713c0ed7e03f45169e87b73ae6408e4f
(cherry picked from commit a5f6bd16062fba89bcf900aca93aa3514d93f662)
Merged-In: Id3e4e159713c0ed7e03f45169e87b73ae6408e4f
Merged-In: Icb5a1b5bb10617aa5a7b35db6cf48db3dc53b7fd
2019-05-13 18:43:00 +08:00
Junyu Lai
7d960da6ff Release keepalive slot after stopped
Currntly, keepalive slot is released when stop() is called. Next
starting keepalive can use the same slot number while previous
keepalive is still stopping. When the previous keepalive is
stopped, the incoming as will be processed by the new keepalive.

This change release keepalive slot after the result of stopping
has returned. Thus, newly created keepalive cannot allocate the
same slot number while lower layer is still processing stop event.

This change also disable flaky assertions that are caused by
test port has been occupied by other process.

Bug: 129512753
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 100
      2. atest FrameworksNetTests --generate-new-metrics 10
      3. simulate the fail case manually.

Change-Id: I790f6bbc5efc3f088034ac45ec379da5f781d0ca
Merged-In: I1991627545519ee5cb408a3df3a006f710f4af7b
(cherry picked from commit 4b0556df84)
2019-05-13 18:42:19 +08:00
Junyu Lai
bdf60ad814 Merge "Fix concurrent modification exception in KeepaliveTracker"
am: 25c06577c9

Change-Id: Ibd23240fdf8fb56b4216e2482152f605374f76db
2019-05-13 03:39:29 -07:00
Junyu Lai
6b6fba6995 [automerger skipped] Merge changes I92f6d977,I06840834 into qt-dev
am: b05b4d609f -s ours
am skip reason: change_id Ibcb91105e46f7e898b8aa7c2babc3344ef2c6257 with SHA1 1f8bf657bb is in history

Change-Id: I64a66b8c08963428d409908f93c1d557fd9e4ff6
2019-05-13 03:14:30 -07:00
Junyu Lai
25c06577c9 Merge "Fix concurrent modification exception in KeepaliveTracker" 2019-05-13 10:09:48 +00:00
junyulai
a6ba710c83 Limit unprivileged keepalives per uid
Public APIs for creating unprivileged NATT socket keepalive
might allow users to exhaust resource if malicious apps try
to create keepalives with fd which is not created by
IpSecService through binder call. Thus, this change add
customizable limitation per uid to prevent resource exhaustion
attack.

Bug: 129371366
Bug: 132307230
Test: atest FrameworksNetTests

Clean cherry-pick of aosp/954040
Merged-In: Ibcb91105e46f7e898b8aa7c2babc3344ef2c6257
Merged-In: Ia667386c1a8949839871a6949d79552d9c8b88f0

Change-Id: I92f6d977b6dfde4e1bf74df6b60c9a0b9e8eec40
2019-05-13 15:53:02 +09:00
junyulai
2f2f0155f1 Support customization of supported keepalive count per transport
This change specifies the required minimum supported keepalives
in SDK, and allows OEMs to customize supported keepalive count
per network through resource overlay.

Bug: 129371366
Test: 1. m -j doc-comment-check-docs
      2. atest FrameworksNetTests

Clean cherry-pick of aosp/946359

Change-Id: I06840834d0ee8121358bf4829fe47ecf9964d395
Merged-In: I0218f3674628c13ead63fc9a873895ba7f113033
Merged-In: Ia667386c1a8949839871a6949d79552d9c8b88f0
2019-05-13 15:52:07 +09:00
junyulai
fe67da777b Fix concurrent modification exception in KeepaliveTracker
In aosp/951200, the clean up function delete the item in the
hash map that holds the record while iterating it, where the
list used to iterate the records is backed by the hash map,
so changes to the map are reflected in the list and caused
the concurrent modification exception.

Bug: 132341736
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 300
      2. atest FrameworksNetTests --generate-new-metrics 10

Change-Id: I0481a469ee23231e5f0ab738a06b5e09f6cdb680
2019-05-13 14:48:41 +08:00
Paul Hu
85984ee4ff [automerger skipped] Merge "Add CTS API coverage for APIs which are used by NetworkStack" into qt-dev
am: 4266b631fc -s ours
am skip reason: change_id Id3f0d1c19a76c7987b69e449203fc50423f5e531 with SHA1 c92f4f1edf is in history

Change-Id: I0dc150eb7a4c72f381df12919de8e7ccfb341ba0
2019-05-12 19:46:24 -07:00
TreeHugger Robot
4266b631fc Merge "Add CTS API coverage for APIs which are used by NetworkStack" into qt-dev 2019-05-13 02:41:34 +00:00
Paul Hu
fea793dd0a [automerger skipped] Merge "Add ApfCapabilities common test cases" into qt-dev
am: c627e5c60c -s ours
am skip reason: change_id Icfd80943212430b2a0e6a4b55f53270cbc3d1693 with SHA1 2a5eefa03d is in history

Change-Id: I759c399eedf0e111de92b5d4538409b0a14759bb
2019-05-12 19:40:50 -07:00
Paul Hu
01b846f210 [automerger skipped] Merge "Add LinkProperties common test cases" into qt-dev
am: 3d8ee7e355 -s ours
am skip reason: change_id I8d36177cbf4f39da602331e091a60a40f6eaea33 with SHA1 08b069e20c is in history

Change-Id: Icc484c8d0c483e3306a892f2ed0300109d1328e3
2019-05-12 19:36:34 -07:00