Commit graph

5,577 commits

Message SHA1
Merge "Update VPN capabilities when its underlying network set is null."
am: 9e226700d9

Change-Id: Id4560d201a40f5e1b1617819991da99d86379dbe

Varun Anand   authored and   android-build-merger   commited 2019-02-15 03:45:03 -08:00
bd97fcd674
Merge "Update VPN capabilities when its underlying network set is null."
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-02-15 11:33:27 +00:00
9e226700d9
Merge "Move NetworkStack to services.net"
am: f66b7a8e60

Change-Id: Iab45985aedb8069ad50fd2913ef6e828989cdd0d

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-15 03:01:11 -08:00
8989e36283
Merge "Move NetworkStack to services.net"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-15 10:52:03 +00:00
f66b7a8e60
Merge "Remove NetworkMonitor dependency on ICaptivePortal"
am: ca55fb73c7

Change-Id: Ia0d06e1aa931cdc1c6dd4008e804a6a44ae2304f

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-15 00:26:34 -08:00
50746281b1
Merge "Remove NetworkMonitor dependency on ICaptivePortal"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-15 08:09:29 +00:00
ca55fb73c7
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

Remi NGUYEN VAN   commited 2019-02-15 12:20:17 +09:00
f1c624afd1
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

Remi NGUYEN VAN   commited 2019-02-15 12:20:03 +09:00
89fbdc360d
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

Varun Anand   commited 2019-02-14 18:50:56 -08:00
273f900b3b
Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master
Xin Li   authored and   Android (Google) Code Review   commited 2019-02-14 22:11:32 +00:00
7687edd138
Merge "Add Test Network and Transport types"
am: df27f67993

Change-Id: I1cf33485adb9f4c442de42060697efe71bb45264

Benedict Wong   authored and   android-build-merger   commited 2019-02-14 10:49:48 -08:00
3a7e4f86ae
Merge "Add Test Network and Transport types"
Benedict Wong   authored and   Gerrit Code Review   commited 2019-02-14 18:37:04 +00:00
df27f67993
DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393

Xin Li   commited 2019-02-14 09:48:06 -08:00
4bf096e345
Merge "Fix flaky testNattSocketKeepalives"
am: 296c5ed68d

Change-Id: Ie9fe40e3bcf4187a2e5cbf525bc4e874cff70747

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-13 20:42:01 -08:00
793f58bb98
Merge "Clear all lingering notifications when network is disconnected"
am: 1037bbb82a

Change-Id: I2d9f84840cdc73ed3b30278d7a9dbeefff233fa3

Lucas Lin   authored and   android-build-merger   commited 2019-02-13 20:29:03 -08:00
460b42bc65
Merge "Fix flaky testNattSocketKeepalives"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-14 03:29:00 +00:00
296c5ed68d
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

Remi NGUYEN VAN   commited 2019-02-14 03:28:48 +00:00
cb0b1fc561
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

lucaslin   authored and   Lucas Lin   commited 2019-02-13 03:23:10 +00:00
b5b671abfd
Merge "Remove hard-coded NetworkStack package name"
am: 20bda51d6c

Change-Id: I0e67a5e857d4f5ba2af1f0928be6d97c0f4ce94f

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-11 20:22:40 -08:00
dba80faaf0
Merge "Remove hard-coded NetworkStack package name"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-12 03:58:09 +00:00
20bda51d6c
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

Benedict Wong   commited 2019-02-11 12:57:43 -08:00
8015602ac9
Snap for 5180536 from b96a8ade50 to pi-platform-release
Change-Id: I7c5a9c9e96572c32eadd97448c4886f9c9150a19

android-build-team Robot   commited 2019-02-09 02:33:11 +00:00
9def767db8
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

Remi NGUYEN VAN   commited 2019-02-08 12:12:57 +09:00
8b3999ca8b
Merge "Check MAINLINE_NETWORK_STACK in ConnectivityService"
am: 641c68cfdb

Change-Id: I5bc7a8dae5667a1509f9741be571008a919b6461

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-06 19:50:15 -08:00
9b177fe2f7
Merge "Check MAINLINE_NETWORK_STACK in ConnectivityService"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-07 03:33:54 +00:00
641c68cfdb
Merge "Add API for NetworkStack to start captive portal"
am: 26b11cdf44

Change-Id: I72166f14ec4f7589a1dbd0334de37530ebccf88e

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-06 18:49:45 -08:00
14b3b4bebc
Merge "Add API for NetworkStack to start captive portal"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-07 02:39:17 +00:00
26b11cdf44
Merge "[KA04] Expose TCP socket keepalive API"
am: 68230eff94

Change-Id: If8bc33ff30a529092802f9450a3772aaaa401c20

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 07:22:31 -08:00
d85bb7f373
Merge "[KA04] Expose TCP socket keepalive API"
Chalard Jean   authored and   Gerrit Code Review   commited 2019-02-06 15:13:02 +00:00
68230eff94
[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

junyulai   authored and   Chalard Jean   commited 2019-02-06 22:51:42 +09:00
c7ea1242ea
Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData"
am: cbd07b88ab

Change-Id: I3ee97cd66e19486ba0edd6cab58bd37b43a0904b

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 01:29:24 -08:00
f5805a6b5c
Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData"
Chalard Jean   authored and   Gerrit Code Review   commited 2019-02-06 09:19:07 +00:00
cbd07b88ab
Check MAINLINE_NETWORK_STACK in ConnectivityService
Treat NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK as equivalent to
NETWORK_STACK, CONNECTIVITY_INTERNAL and NETWORK_SETTINGS combined.
NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK is defined as signature
permission in NetworkStackPermissionStub, which is signed with the
platform certificate, so requirements are the same for both permissions.

The permission is defined by NetworkStackPermissionStub and only used by
NetworkStack, which must be signed with the same key as the stub.

Test: flashed, booted, WiFi works, also with changes on top removing
      CONNECTIVITY_INTERNAL and NETWORK_SETTINGS
Bug: 112869080
Change-Id: I9d0ea8fc99eadf7e902421efdba9b8bf535658b8

Remi NGUYEN VAN   commited 2019-02-06 17:57:09 +09:00
7bfa1c0b2e
Merge "Deprecate getActiveLinkProperties."
am: e429dfd104

Change-Id: I745db0698d3fe76779e83c98aff9464a2b1b0709

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 00:45:03 -08:00
69a894623b
Merge "Deprecate getActiveLinkProperties."
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-02-06 08:32:10 +00:00
e429dfd104
Add API for NetworkStack to start captive portal
Endpoints protected with INTERACT_ACROSS_USERS_FULL, such as
startActivityAsUser, should only be used by modules signed with the
platform cert. The NetworkStack needs to have the system server start
the application so this restriction can be applied.

Bug: 123846255
Test: flashed, captive portal works from primary and secondary user
Change-Id: Ib3e427b3fd03ced80c02985e795f79b096a2ec9a

Remi NGUYEN VAN   commited 2019-02-06 16:38:32 +09:00
f363f5f366
Deprecate getActiveLinkProperties.
There are other, more idiomatic ways to do this. Deprecating this
with usage limited to P will curb usage and reduce the maintenance
load.
This also deprecates the extra EXTRA_NETWORK_TYPE, which has
survived from an old world but has only been used in deprecated
broadcasts for some time.

Bug: 109783091
Test: eyeball current.txt
Change-Id: I87b74833bb4ec362ee3fd07511a66d318c29067d

Chalard Jean   commited 2019-02-06 15:44:44 +09:00
cc47b52a9c
Merge "[KA03] Support tcp keepalive offload"
am: 5f8ddc2eb1

Change-Id: I7715266c2c24d3f5dd65cd0e375d99b16be6aea6

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 22:19:41 -08:00
0bebdf2e1e
[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData
Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: I057dde79013b9eda5037b9a44f8eee06cc07352e

junyulai   authored and   Chalard Jean   commited 2019-02-06 14:07:39 +09:00
8c1586e956
[KA03] Support tcp keepalive offload
When offload is starting, socket will be switched to repair
mode. Read and write on the socket will not be allowed until
repair mode is turned off. If remote packet arrives, repair
mode will be turned off automatically and a callback will
be raised to indicate that socket is ready to read from.

Bug: 114151147
Test: -atest FrameworksNetTests
      -manual

Change-Id: I0c335865912e183e7ad32a8ea12188f02ccde5fd

markchien   authored and   Chalard Jean   commited 2019-02-06 12:22:22 +09:00
46f41d4b16
Merge "[KA02] internal cleanup and refactor for SocketKeepalive"
am: 292da961e6

Change-Id: I211be98b0d3f5e1c7068a241cbd7e913ae72c461

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 10:25:01 -08:00
3527414d22
[KA02] internal cleanup and refactor for SocketKeepalive
In previous change, the new SocketKeepalive API was exported.
But internally, old PacketKeepalive names and structures are
still used.

This change rename them properly for code consistency and also
refactor KeepalivePacketData to support different types of
KeepalivePacketData.

Bug: 114151147
Test: 1. atest FrameworksNetTests
      2. atest FrameworksWifiTests
      3. atest FrameworksTelephonyTests

Change-Id: Ia9917d12987e91e87e34ffb3f126e7bc7c9c187e
Merged-In: Ia9917d12987e91e87e34ffb3f126e7bc7c9c187e

junyulai   authored and   Chalard Jean   commited 2019-02-05 20:13:47 +09:00
21c06d06ce
Merge changes from topic "bindprocess-resolv"
am: 8b25d6c7d8

Change-Id: I3aacc6c2ae5242e28eec6e9e8e2a9a4b3e4f715d

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-31 00:11:25 -08:00
79010e2cb5
Merge changes from topic "bindprocess-resolv"
* changes:
  Allow use of bindProcessToNetwork only to change private DNS bypass.
  Allow bypassing private DNS via bindProcessToNetwork.

Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-31 07:52:04 +00:00
8b25d6c7d8
Merge "Add get last entitlement value callback API"
am: 13f0ce23a5

Change-Id: I1961297c3fa31f5575ae3a11a3fc90d695cb7de5

Mark Chien   authored and   android-build-merger   commited 2019-01-30 23:35:15 -08:00
5ba51d8c7f
Merge "Add get last entitlement value callback API"
Mark Chien   authored and   Gerrit Code Review   commited 2019-01-31 07:23:31 +00:00
13f0ce23a5
Add get last entitlement value callback API
The callback would be used to notify entitlement value. If the
cache value indicates entitlement succeeded, it just fire
callback with cache value instead of run entitlement check.

Bug: 120887283
Test: atest FrameworksNetTests
Change-Id: I8afe928423bd75c54c61533a50a5c0814922ceb1

markchien   commited 2019-01-31 12:31:55 +08:00
5bd499ca4b
Allow use of bindProcessToNetwork only to change private DNS bypass.
Currently it is not possible to change private DNS bypass by
doing:

  setProcessDefaultNetwork(network.getPrivateDnsBypassingCopy());
  setProcessDefaultNetwork(network);

because the code will ignore the change. Fix this by ensuring
that we always call bindProcessToNetwork (which does not have
side effects) and then only performing the expensive operations
(flushing DNS cache, upating socket pools) if the netId changed.

Bug: 112869080
Test: None
Change-Id: I5e8999cb11d8b8c1e9eb583fa8b3932f212accff

Lorenzo Colitti   commited 2019-01-31 13:08:24 +09:00
3fadff929c
Merge "Add an API that allows VPNs to declare themselves as metered."
am: fcfc88d14e

Change-Id: Iadf012754e2e39f4b99efc97d5666dd0bc1ff2d6

Varun Anand   authored and   android-build-merger   commited 2019-01-30 19:09:30 -08:00
84bec449a3
Merge "Add an API that allows VPNs to declare themselves as metered."
Varun Anand   authored and   Gerrit Code Review   commited 2019-01-31 02:43:25 +00:00
fcfc88d14e