Commit Graph

6106 Commits

Author SHA1 Message Date
Xin Li
c6a489ba2c [automerger skipped] Merge changes from topic "PPRL.190205.001" am: 6e7600f32f -s ours
am: a9588c6ea9 -s ours
am skip reason: change_id I421c7487955ee339f88e3957c973375d0f87e2ff with SHA1 95bd7221f6 is in history

Change-Id: If0a545f1a09f0a4471f2c6adadfe79ad434bebd4
2019-02-20 10:36:50 -08:00
Xin Li
a9588c6ea9 [automerger skipped] Merge changes from topic "PPRL.190205.001"
am: 6e7600f32f -s ours
am skip reason: change_id I421c7487955ee339f88e3957c973375d0f87e2ff with SHA1 95bd7221f6 is in history

Change-Id: Ieb824b633f240abc96ee25f39c68f55f1bd621bd
2019-02-20 10:17:48 -08:00
Xin Li
6e7600f32f Merge changes from topic "PPRL.190205.001"
* changes:
  Fix merge problems with cherry-picking "Add notification settings to backup&restore" change into pi-dev
  DO NOT MERGE - Merge PPRL.190205.001 into master
2019-02-20 16:25:58 +00:00
Rubin Xu
e70e6ddd39 Merge "Skip unreachable route when estimating VPN destinations" am: e26fb9d574 am: fab8b096c3
am: dcdc2174af

Change-Id: Id81038035eddf98d0c4546ddb25c8f6ed5736ad6
2019-02-20 04:35:38 -08:00
Rubin Xu
dcdc2174af Merge "Skip unreachable route when estimating VPN destinations" am: e26fb9d574
am: fab8b096c3

Change-Id: Ia9301b3bf52b42a742f1f6b3a02499a1404ed3f1
2019-02-20 04:26:25 -08:00
Rubin Xu
fab8b096c3 Merge "Skip unreachable route when estimating VPN destinations"
am: e26fb9d574

Change-Id: Iafa9ecaf07a36f235b366655d2fa2165a676d1cd
2019-02-20 04:15:55 -08:00
Treehugger Robot
e26fb9d574 Merge "Skip unreachable route when estimating VPN destinations" 2019-02-20 12:00:15 +00:00
Rubin Xu
8b1352fdaa Skip unreachable route when estimating VPN destinations
Bug: 122652441
Test: atest com.android.server.connectivity.VpnTest
Test: Establish a IPv4 VPN with minimal routes and check
(dumpsys connectivity) the VPN network does not have INTERNET
capability.

Change-Id: Ic7f19ebb7b7f78a6ffb2a8ec3fc3eca5e5421f57
2019-02-19 17:18:34 +00:00
Varun Anand
bbefd325bc Merge "Update VPN capabilities when its underlying network set is null." am: c7702baa80 am: 07fff8eb3c
am: 30714647b4

Change-Id: I6dd5a369f1a3b74bbf498051ef1e4d1b31bd8e5e
2019-02-15 04:11:55 -08:00
Varun Anand
30714647b4 Merge "Update VPN capabilities when its underlying network set is null." am: c7702baa80
am: 07fff8eb3c

Change-Id: I832cbc4646c010add5a4f051d3f7151cfc94120c
2019-02-15 03:54:28 -08:00
Varun Anand
07fff8eb3c Merge "Update VPN capabilities when its underlying network set is null."
am: c7702baa80

Change-Id: Id4560d201a40f5e1b1617819991da99d86379dbe
2019-02-15 03:45:03 -08:00
Treehugger Robot
c7702baa80 Merge "Update VPN capabilities when its underlying network set is null." 2019-02-15 11:33:27 +00:00
Remi NGUYEN VAN
bec1549e0d [automerger skipped] Merge "Move NetworkStack to services.net" am: 4616612b6b am: ef77a4a341
am: 4eac707c0a -s ours
am skip reason: change_id I501b125a388c1100c2182bde4670944c2f0d7a02 with SHA1 b6997cc4da is in history

Change-Id: Iba45b354c8a6b690177a1bc9928ea87a5850515c
2019-02-15 03:19:33 -08:00
Remi NGUYEN VAN
4eac707c0a Merge "Move NetworkStack to services.net" am: 4616612b6b
am: ef77a4a341

Change-Id: I6a0ddc23bf95039d9d51a4fde9dd87d2f5bf71ee
2019-02-15 03:10:18 -08:00
Remi NGUYEN VAN
ef77a4a341 Merge "Move NetworkStack to services.net"
am: 4616612b6b

Change-Id: Iab45985aedb8069ad50fd2913ef6e828989cdd0d
2019-02-15 03:01:11 -08:00
Remi NGUYEN VAN
4616612b6b Merge "Move NetworkStack to services.net" 2019-02-15 10:52:03 +00:00
Remi NGUYEN VAN
f39c5b5e07 [automerger skipped] Merge "Remove NetworkMonitor dependency on ICaptivePortal" am: 399be8f9b9 am: 48eaae51e3
am: b7bcb16007 -s ours
am skip reason: change_id Ib6a89e54312628662b130fbeec18d11e139f09fa with SHA1 ad9f6d89f6 is in history

Change-Id: Id24f7fd07472e541d109c6fd08be78bdc2c2bf6a
2019-02-15 00:43:22 -08:00
Remi NGUYEN VAN
b7bcb16007 Merge "Remove NetworkMonitor dependency on ICaptivePortal" am: 399be8f9b9
am: 48eaae51e3

Change-Id: I60c67a42bce60615f7e0ce86aaafac4fbff19795
2019-02-15 00:34:13 -08:00
Remi NGUYEN VAN
48eaae51e3 Merge "Remove NetworkMonitor dependency on ICaptivePortal"
am: 399be8f9b9

Change-Id: Ia0d06e1aa931cdc1c6dd4008e804a6a44ae2304f
2019-02-15 00:26:34 -08:00
Remi NGUYEN VAN
399be8f9b9 Merge "Remove NetworkMonitor dependency on ICaptivePortal" 2019-02-15 08:09:29 +00:00
Remi NGUYEN VAN
14aff42bdf Merge "Move NetworkStack to services.net" 2019-02-15 07:25:09 +00:00
Xin Li
829f39dccf [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: 63aeccfcd6 -s ours
am skip reason: subject contains skip directive

Change-Id: Ib0b6f1151f8552b8a78ab6263fc5f4676444b37c
2019-02-14 21:46:01 -08:00
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