Commit Graph

6334 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
2438b45092 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 05:39:14 +00:00
Xin Li
dc36f68ee0 [automerger skipped] DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master am: 472cc5b849 -s ours
am: 9e9b350099 -s ours
am skip reason: subject contains skip directive

Change-Id: I333d887a77e5ff5f0949c02fc460b8d23cded964
2019-02-14 21:02:00 -08:00
Remi NGUYEN VAN
ef59a21ff4 Move NetworkStack to services.net
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: Ib1d08a3669983640119d008db7e2990fa798724f
Merged-In: I501b125a388c1100c2182bde4670944c2f0d7a02
2019-02-15 12:20:17 +09:00
Remi NGUYEN VAN
eab0f54735 Remove NetworkMonitor dependency on ICaptivePortal
ICaptivePortal is used in the framework and cannot be used as a
dependency in NetworkMonitor, as the framework class takes precedence
when linking.
Also fix NetworkMonitorTest that was not verifying the right
startCaptivePortalApp call.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: I8e7bb79e50650ae182a2e4277fb49abf5fb6d910
Merged-In: Ib6a89e54312628662b130fbeec18d11e139f09fa
2019-02-15 12:20:03 +09:00
Varun Anand
df56995870 Update VPN capabilities when its underlying network set is null.
Previously, they were only updated when underlying network set was
non-null.

This change also ensures that all the calls b/w ConnectivityService and
Vpn that leads to updating capabilities are on ConnectivityService
handler thread.

Additionally, it also ensures that capabilities are propagated after VPN
enters connected state. This was previously done from establish which
could potentially lead to race between VPN getting connected and
capabilities getting updated.

This change also updates VPN capabilities inline from
ConnectivityService handler thread. Previously, there was an additional
loop where Vpn would update capabilities via NetworkAgent thru
AsyncChannel which posts back to CS handler thread, which could
potentially lead to delays in updating VPN capabilities.

Bug: 119129310
Bug: 118856062
Bug: 124268198
Test: atest FrameworksNetTests
Test: manual - verified VPNs capabilities are getting updated and
DownloadManager is working correctly.

Change-Id: Id0abc4d304bb096e92479a118168690ccce634ed
2019-02-14 18:50:56 -08:00
Xin Li
63aeccfcd6 [automerger skipped] Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master
am: 4198f09aa7 -s ours
am skip reason: subject contains skip directive

Change-Id: Ifbfb1fb0db0d4771a968c0c9819dd03c5f2e549b
2019-02-14 16:41:23 -08:00
Xin Li
9e9b350099 [automerger skipped] DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master
am: 472cc5b849 -s ours
am skip reason: subject contains skip directive

Change-Id: I49505ddfda138f983dd8a75361f270549254f4f8
2019-02-14 14:33:10 -08:00
Xin Li
4198f09aa7 Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master 2019-02-14 22:11:32 +00:00
Benedict Wong
4e34100090 Merge "Add Test Network and Transport types" am: 9a5d3ba1ad am: 9dd06ba6a9
am: b6848e1c03

Change-Id: Ia9c100ebeb8b54e743820b74ff35d006919e9fbb
2019-02-14 11:08:57 -08:00
Benedict Wong
b6848e1c03 Merge "Add Test Network and Transport types" am: 9a5d3ba1ad
am: 9dd06ba6a9

Change-Id: I371a4f3bdbbfd001e9694e29843b6b7119b938b0
2019-02-14 10:59:02 -08:00
Benedict Wong
9dd06ba6a9 Merge "Add Test Network and Transport types"
am: 9a5d3ba1ad

Change-Id: I1cf33485adb9f4c442de42060697efe71bb45264
2019-02-14 10:49:48 -08:00
Benedict Wong
9a5d3ba1ad Merge "Add Test Network and Transport types" 2019-02-14 18:37:04 +00:00
Xin Li
472cc5b849 DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Remi NGUYEN VAN
b6997cc4da Move NetworkStack to services.net
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.

(cherry-pick of aosp/905233 with trivial conflicts in SystemServer.java)

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: I501b125a388c1100c2182bde4670944c2f0d7a02
2019-02-14 20:43:43 +09:00
Remi NGUYEN VAN
ad9f6d89f6 Remove NetworkMonitor dependency on ICaptivePortal
ICaptivePortal is used in the framework and cannot be used as a
dependency in NetworkMonitor, as the framework class takes precedence
when linking.
Also fix NetworkMonitorTest that was not verifying the right
startCaptivePortalApp call.

(cherry-pick of aosp/904953 with minor conflict in Android.bp)

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: Ib6a89e54312628662b130fbeec18d11e139f09fa
2019-02-14 20:36:40 +09:00
Remi NGUYEN VAN
c6b0f1a86b Merge "Fix flaky testNattSocketKeepalives" am: 9a9e288607 am: ec2b289d42
am: 5dd6eb9d15

Change-Id: Ibfdd4dddb8dad9ee26f9f1ec175ca87bc46ce761
2019-02-13 21:45:39 -08:00
Remi NGUYEN VAN
5dd6eb9d15 Merge "Fix flaky testNattSocketKeepalives" am: 9a9e288607
am: ec2b289d42

Change-Id: I20ec043e5caeb61c4e31f087a10deb2dc13c0d95
2019-02-13 21:24:35 -08:00
Lucas Lin
a18bc60698 Merge "Clear all lingering notifications when network is disconnected" am: 1037bbb82a am: da969f4f40
am: 5e311c0aff

Change-Id: I2ef6009364bd1420c915df003e2ff5c3857ef3e7
2019-02-13 21:20:09 -08:00
Lucas Lin
5e311c0aff Merge "Clear all lingering notifications when network is disconnected" am: 1037bbb82a
am: da969f4f40

Change-Id: I441a37682e11aa349301750c26545c5c0f1a274a
2019-02-13 21:04:01 -08:00
Remi NGUYEN VAN
ec2b289d42 Merge "Fix flaky testNattSocketKeepalives"
am: 9a9e288607

Change-Id: Ie9fe40e3bcf4187a2e5cbf525bc4e874cff70747
2019-02-13 20:42:01 -08:00
Lucas Lin
da969f4f40 Merge "Clear all lingering notifications when network is disconnected"
am: 1037bbb82a

Change-Id: I2d9f84840cdc73ed3b30278d7a9dbeefff233fa3
2019-02-13 20:29:03 -08:00
Remi NGUYEN VAN
9a9e288607 Merge "Fix flaky testNattSocketKeepalives" 2019-02-14 03:29:00 +00:00
Remi NGUYEN VAN
b76f9ee4e6 Fix flaky testNattSocketKeepalives
The test did not wait for the WifiNetworkAgent to disconnect, and there
are reports of flakes where it is still connected in
connectKeepaliveNetwork.

Test: atest FrameworksNetTests
Bug: 124319553
Change-Id: I85968806885c8853ec4f4dbea356366c1af0ea1c
2019-02-14 03:28:48 +00:00
Etan Cohen
4ad1b9f839 [CS] Support "instant failure" from factories
Add a mechanism by which a factory can declare "instant failure" for
a request - which would result in it getting an OnUnavailable()
(even without a timeout).

Factories may only do this iff:
1. They know they are the only factory which may fulfill this
   request (common for transport-specific requests).
2. The know that the request can definitely not be
   fulfilled at any point in the future.

Bug: 31382922
Test: atest ConnectivityServiceTest
Change-Id: I9bce0f4d85fa8cad7f8a9998819f945b778c5ac5
2019-02-13 08:44:51 -08:00
lucaslin
b25c9a6cb3 Clear all lingering notifications when network is disconnected
In aosp/861571, it tried to refine the design to prevent the
lingering notification is cleared unexpectedly. However, all
notifications should be cleared when network is disconnected.
Refine the design by clearing all lingering notifications when
network is disconnected.

Bug: 123488640
Bug: 123537643
Test: 1.Build pass
      2.atest FrameworksNetTests
      3.Connect to a hotspot which doesn't have internet,
      after getting "NO_INTERNET" notification, disconnect
      the wifi and check if "NO_INTERNET" notification will
      be cleared or not.
Change-Id: Iac45ec186cf81915c318dba37f43136609d579f6
2019-02-13 03:23:10 +00:00
Remi NGUYEN VAN
a18c91cc73 Merge "Remove hard-coded NetworkStack package name" am: 694dd4a5e2 am: e6fbb4664f
am: 43d71b08f5

Change-Id: Ic93c22e03a4ead4ec37b955993a32c8ce284e0a6
2019-02-11 20:44:47 -08:00
Remi NGUYEN VAN
43d71b08f5 Merge "Remove hard-coded NetworkStack package name" am: 694dd4a5e2
am: e6fbb4664f

Change-Id: If82997f9f46a34014e797f10a71c34bfb4150585
2019-02-11 20:34:20 -08:00
Remi NGUYEN VAN
e6fbb4664f Merge "Remove hard-coded NetworkStack package name"
am: 694dd4a5e2

Change-Id: I0e67a5e857d4f5ba2af1f0928be6d97c0f4ce94f
2019-02-11 20:22:40 -08:00
Remi NGUYEN VAN
694dd4a5e2 Merge "Remove hard-coded NetworkStack package name" 2019-02-12 03:58:09 +00:00
Benedict Wong
bdfaa48ced Add Test Network and Transport types
This change adds new network types for testing purposes, signifying a
network with an extremely limited feature set.

Bug: 72950854
Test: Compiles, CTS tests relying on this work correctly.
Change-Id: I06cade6044afd12e0b69ed3c2f160f27f85d43d0
2019-02-11 12:57:43 -08:00
android-build-team Robot
79cdc783ee Snap for 5180536 from 1151e49dce to pi-platform-release
Change-Id: I7c5a9c9e96572c32eadd97448c4886f9c9150a19
2019-02-09 02:33:11 +00:00
Remi NGUYEN VAN
794c7f2ee3 Remove hard-coded NetworkStack package name
Have the network stack pass its package name in
showProvisioningNotification instead.

Bug: 124033493
Test: flashed, WiFi and captive portal works
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I1f3312768ba1fb34e99a827e1fcdaf7510e318a8
2019-02-08 12:12:57 +09:00
Remi NGUYEN VAN
77adda1a20 Merge "Check MAINLINE_NETWORK_STACK in ConnectivityService" am: 2f96229cbd am: 9da4305183
am: b9c1d6083d

Change-Id: I0a52fc46a22d21147ab7d1594fd79182b5f23eb7
2019-02-06 20:10:28 -08:00
Remi NGUYEN VAN
b9c1d6083d Merge "Check MAINLINE_NETWORK_STACK in ConnectivityService" am: 2f96229cbd
am: 9da4305183

Change-Id: I5684b4fdc0e1030d372287d53f22b66fe8d90420
2019-02-06 19:58:59 -08:00
Remi NGUYEN VAN
9da4305183 Merge "Check MAINLINE_NETWORK_STACK in ConnectivityService"
am: 2f96229cbd

Change-Id: I5bc7a8dae5667a1509f9741be571008a919b6461
2019-02-06 19:50:15 -08:00
Remi NGUYEN VAN
2f96229cbd Merge "Check MAINLINE_NETWORK_STACK in ConnectivityService" 2019-02-07 03:33:54 +00:00
Remi NGUYEN VAN
f7bdf02a86 Merge "Add API for NetworkStack to start captive portal" am: 9d0e114e66 am: 640909fadf
am: d98c01d468

Change-Id: I54a32dd01f1f697fc7da703bc1d258ed6a43df23
2019-02-06 19:08:29 -08:00
Remi NGUYEN VAN
d98c01d468 Merge "Add API for NetworkStack to start captive portal" am: 9d0e114e66
am: 640909fadf

Change-Id: Ie428acbfce0f94f0bade67258fefbb3253a539df
2019-02-06 18:58:57 -08:00
Remi NGUYEN VAN
640909fadf Merge "Add API for NetworkStack to start captive portal"
am: 9d0e114e66

Change-Id: I72166f14ec4f7589a1dbd0334de37530ebccf88e
2019-02-06 18:49:45 -08:00
Remi NGUYEN VAN
9d0e114e66 Merge "Add API for NetworkStack to start captive portal" 2019-02-07 02:39:17 +00:00
Chalard Jean
1342d99e50 Merge "[KA04] Expose TCP socket keepalive API" am: b099846c86 am: f924dfe504
am: 3e622644b4

Change-Id: I490acd417b3f70ba1dec3bbf9f049088b849c782
2019-02-06 07:41:19 -08:00
Chalard Jean
3e622644b4 Merge "[KA04] Expose TCP socket keepalive API" am: b099846c86
am: f924dfe504

Change-Id: Ia5c108bfa42ab0de9d4cdf676c5980dc9a9aba12
2019-02-06 07:31:44 -08:00
Chalard Jean
f924dfe504 Merge "[KA04] Expose TCP socket keepalive API"
am: b099846c86

Change-Id: If8bc33ff30a529092802f9450a3772aaaa401c20
2019-02-06 07:22:31 -08:00
Chalard Jean
b099846c86 Merge "[KA04] Expose TCP socket keepalive API" 2019-02-06 15:13:02 +00:00
junyulai
0835a1eaea [KA04] Expose TCP socket keepalive API
The new set of API allows applications to request keepalives
offload for established TCP sockets over wifi.

However, the application must not write to or read from the
socket after calling this method, until specific callbacks are
called.

Bug: 114151147
Test: atest FrameworksNetTests FrameworksWifiTests NetworkStackTests

Change-Id: I3880505dbc35fefa34ef6c79555458ecf5d296a4
2019-02-06 22:51:42 +09:00
Chalard Jean
cd6d2a46eb Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" am: 6e55aca3fa am: 90cad47708
am: aa12af640b

Change-Id: I700550160c795becb4c3e37a88328488846d272f
2019-02-06 01:47:49 -08:00
Chalard Jean
aa12af640b Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" am: 6e55aca3fa
am: 90cad47708

Change-Id: I3b0645585140d8ee12f896946a2a1fbb519e6195
2019-02-06 01:38:31 -08:00
Chalard Jean
90cad47708 Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData"
am: 6e55aca3fa

Change-Id: I3ee97cd66e19486ba0edd6cab58bd37b43a0904b
2019-02-06 01:29:24 -08:00
Chalard Jean
6e55aca3fa Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" 2019-02-06 09:19:07 +00:00
Chalard Jean
8ee0ccedf5 Merge "Deprecate getActiveLinkProperties." am: 39d46d221b am: 10a24f1d46
am: 7bb6a9ed3e

Change-Id: I364a5420ab6552f652fa40a6607af249f92770c6
2019-02-06 01:03:25 -08:00