Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
Merge "Add API for NetworkStack to start captive portal" am: 9d0e114e66
am: 640909fadf

Change-Id: Ie428acbfce0f94f0bade67258fefbb3253a539df

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-06 18:58:57 -08:00
d98c01d468
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
9d0e114e66
Merge "[KA04] Expose TCP socket keepalive API" am: b099846c86
am: f924dfe504

Change-Id: Ia5c108bfa42ab0de9d4cdf676c5980dc9a9aba12

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 07:31:44 -08:00
3e622644b4
[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
0835a1eaea
Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" am: 6e55aca3fa
am: 90cad47708

Change-Id: I3b0645585140d8ee12f896946a2a1fbb519e6195

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 01:38:31 -08:00
aa12af640b
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
6e55aca3fa
Merge "Deprecate getActiveLinkProperties." am: 39d46d221b
am: 10a24f1d46

Change-Id: Iab302f94c8b33373831e1aa2aa4ff2beac9cf82f

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 00:54:12 -08:00
7bb6a9ed3e
Merge "Deprecate getActiveLinkProperties."
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-02-06 08:32:10 +00:00
39d46d221b
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
94ff95bbcd
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
97021a1eeb
Merge "[KA03] Support tcp keepalive offload" am: 5f8ddc2eb1
am: 0b93464e32

Change-Id: I695f8a96348b3033bd20a2a9d42ac9ee2bd485ad

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 22:32:01 -08:00
d6cedf5ed3
[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
80d0356311
[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
e5591ce2fa
Merge "[KA02] internal cleanup and refactor for SocketKeepalive" am: 292da961e6
am: 839c99be82

Change-Id: I242fdacdd70729367f60da80a1a27d8f5a08dff6

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 10:39:31 -08:00
9a003aaebc
[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
011b1f15c2
Merge changes from topic "bindprocess-resolv" am: af8e41c434
am: 4b8dee1177

Change-Id: I80f85170981c2f5b1ef949b5db88baf5fc101cd0

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-31 00:19:37 -08:00
301ff56903
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
af8e41c434
Merge "Add get last entitlement value callback API" am: 029be80b79
am: ffe3d99f91

Change-Id: I42892bdacaa41f9cea7e653f0bb9b5497192e5f6

Mark Chien   authored and   android-build-merger   commited 2019-01-30 23:49:43 -08:00
5433fa3269
Merge "Add get last entitlement value callback API"
Mark Chien   authored and   Gerrit Code Review   commited 2019-01-31 07:23:31 +00:00
029be80b79
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
0f45bb9d3d
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
3c766ebc4d
Merge "Add SystemApi for captive portal metrics" am: b591097458
am: 3efa288531

Change-Id: I15adc597039539d53e5c08dc5f8cac74bcb0eda2

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-30 14:42:34 -08:00
9002494f06
Merge "Nuke old setAlwaysOnVpnPackageForUser method." am: 35a8f1a38a
am: bd757b5a3d

Change-Id: I7f0de294357ae6c691d38be52dd278eb37d42116

Pavel Grafov   authored and   android-build-merger   commited 2019-01-30 14:36:37 -08:00
2bdb01f0a0
Merge "Add SystemApi for captive portal metrics"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-30 22:24:12 +00:00
b591097458
Nuke old setAlwaysOnVpnPackageForUser method.
All callers have migrated to 4-argument one.

Test: builds
Bug: 77468593
Change-Id: I253515f6b0100b675505646339e5b82d373c9429

Pavel Grafov   commited 2019-01-30 19:56:36 +00:00
4ed5cbd750
Allow bypassing private DNS via bindProcessToNetwork.
Currently, bypassing private DNS requires calling the deprecated
setProcessDefaultNetworkForHostResolution. Allow apps to do this
via the non-deprecated binProcessForNetwork as well.

This has fewer backwards compatibility concerns than the
alternative approach of having setProcessDefaultNetwork call
setProcessDefaultNetworkForHostResolution. That approach would
have been problematic, for example, if an app did:

  cm.bindProcessToNetwork(network);
  ...
  cm.bindProcessToNetwork(null);

In this case, it would be difficult to know whether to clear the
resolver mapping as well: what if an app had also called
setProcessDefaultNetworkForHostResolution?

Similarly, it would be difficult to know what to do if an app did:

  cm.setProcessDefaultNetworkForHostResolution(network);
  cm.bindProcessToNetwork(null);

This approach does not have these concerns, and has no effect
on apps that don't call Network.getPrivateDnsBypassingCopy, which
regular apps don't have permission to use. It also provides a
path to deprecate setProcessDefaultNetworkForHostResolution.

Bug: 112869080
Test: atest android.net.cts.ConnectivityManagerTest android.net.cts.MultinetworkApiTest
Change-Id: I4158a37b6ed87a9a9b2677c526dcfee8af48e483

Lorenzo Colitti   commited 2019-01-31 00:55:47 +09:00
3a1cb9d615
Add SystemApi for captive portal metrics
The metrics go through NetworkMonitor in the NetworkStack so that they
can be upgraded to new metrics in the future.

Test: flashed, captive portal login works, metrics shown in events log
Bug: 112869080
Merged-In: I4bccfbd87bae5b2d65e45c7a5918aa45ab5d76e8
Change-Id: Ib5e2126788f8d56a00a56d7efcd33c5f9a37a6de

Remi NGUYEN VAN   commited 2019-01-30 22:54:27 +09:00
fb43a914d3
Merge "Remove last NetworkStack usage of hidden APIs" am: 16ec5d038c
am: 19542eea9e

Change-Id: I488fc028b8fd2aa5a09464082c65a4889a8a6b62

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-29 21:27:50 -08:00
b7829c8fec
Remove last NetworkStack usage of hidden APIs
Includes various small changes to stop using hidden APIs

Test: make NetworkStack
Test: flashed, booted, WiFi and tethering working
Bug: 112869080
Change-Id: Id2830795a444f484b377ed6437435a1cd833697a

Remi NGUYEN VAN   commited 2019-01-30 10:23:24 +09:00
6e82be4e4a
Merge "Add NetworkUtils utilities to SystemApi" am: 9cc31061fe
am: 5896eb1b1a

Change-Id: I978bdb626c1f4c8bbe736c8bad1c74fb6a67b4b5

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-29 03:29:01 -08:00
03fe002386
Add NetworkUtils utilities to SystemApi
attach*Filter and addArpEntry are necessary for the NetworkStack but are
only usable for apps that have system permissions.
Also includes system API for IpPrefix, LinkAddress, LinkProperties,
Network, and static modifier in ApfCapabilities that were missed in
previous CLs.

Test: Builds, flashed, WiFi works
Bug: 112869080
Change-Id: If141ae6a2f9145f5af64ba002ca44938f39b90a9

Remi NGUYEN VAN   commited 2019-01-29 17:30:26 +09:00
c7fe99fdbe
Merge "Add SocketUtils for NetworkStack" am: 37053eb78e
am: e90dc24b2c

Change-Id: I89fe62b4baf63104359bb6741807bb2f1666cdd9

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-28 22:57:39 -08:00
d3e5405831
Merge "Whitelist packages from VPN lockdown." am: 76e3e0052c
am: f6c5ef95d1

Change-Id: I10094606f74e6cdc5f4b0b6591cf776fd895b1d3

Pavel Grafov   authored and   android-build-merger   commited 2019-01-28 21:34:03 -08:00
e4dab6797f
Merge "Add SocketUtils for NetworkStack"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-28 23:14:08 +00:00
37053eb78e
Merge "Whitelist packages from VPN lockdown."
Pavel Grafov   authored and   Gerrit Code Review   commited 2019-01-28 20:15:49 +00:00
76e3e0052c
Add SocketUtils for NetworkStack
These utilities can only be used for privileged apps. The underlying
implementation cannot be @SystemApi.

Test: m
Bug: 112869080
Change-Id: Idfa90561102e5b03ab2b79486d3ad46457128bf8

Remi NGUYEN VAN   commited 2019-01-28 20:11:27 +09:00
a628730d0a
Merge "Move NetworkUtils used by NetworkStack" am: 8f8deae60f
am: 249646cc60

Change-Id: I0d6a40c79e92d1de18c41cc50b72fbe33db13bdc

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-28 01:30:17 -08:00
8d31333b7d
Merge "Move NetworkUtils used by NetworkStack"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-28 09:06:20 +00:00
8f8deae60f
Merge "Add NetworkStack networking deps to SystemApi" am: 9188b49259
am: 5fb799d7ee

Change-Id: I843cb189750666a2cb70b1960d49dfe797f3cf36

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-28 00:35:46 -08:00
d08b6d2105
Move NetworkUtils used by NetworkStack
Depending on usage move into NetworkStackUtils or shared
Inet4AddressUtils.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Merged-In: Ie20dcee375b377236004a7689890729493aca857
Change-Id: Ib8d000529872796022706a35050fdc2c7141f2ab

Remi NGUYEN VAN   commited 2019-01-28 13:45:17 +09:00
e167e117c1
Add NetworkStack networking deps to SystemApi
Cherry-pick with conflicts fixed in CaptivePortalLoginActivity imports.
Test: atest FrameworksNetTests
Bug: 112869080
Merged-In: Id59dc06fb85e4ac88098f56b621ec880610759ce
Change-Id: I3c05e8fdd70497426d4fa433295c4fbdad07d9c9

Remi NGUYEN VAN   commited 2019-01-28 13:28:35 +09:00
8bd18cff9a
Whitelist packages from VPN lockdown.
Bug: 77468593
Test: atest com.android.server.connectivity.VpnTest
Change-Id: I9119c139ab07a761ce5dfd1365b70eb905fd32dc

Pavel Grafov   commited 2019-01-25 19:59:03 +00:00
3aeb3f3455
Merge "Revert "Whitelist packages from VPN lockdown."" am: 7e81ae73b4
am: 8840cbd3fa

Change-Id: I933a58f97b48f7a2db372cff6fb43318c840c6f8

Dan Albert   authored and   android-build-merger   commited 2019-01-24 13:58:15 -08:00
511c26364f
Merge "Revert "Whitelist packages from VPN lockdown.""
Dan Albert   authored and   Gerrit Code Review   commited 2019-01-24 21:08:46 +00:00
7e81ae73b4
Revert "Whitelist packages from VPN lockdown."
This reverts commit f1a610a1c2.

Reason for revert: broke pi-dev-plus-aosp

Change-Id: Iaf5c8aa4a8720eb2852da8cd91c81a77ccb92b68

Dan Albert   commited 2019-01-24 21:05:39 +00:00
45f1a24661
Merge "Add API for proxy configuration over VPN." am: b11e29d4b3
am: 83662532c8

Change-Id: I51930e4ed99cc3df10db2c8bbef27989f0a06a46

Irina Dumitrescu   authored and   android-build-merger   commited 2019-01-24 10:20:32 -08:00
d44785fc13
Merge "Whitelist packages from VPN lockdown." am: bec7854508
am: 4934a54f2e

Change-Id: I643fc2603f7cd2b928fe517eb473048004273835

Pavel Grafov   authored and   android-build-merger   commited 2019-01-24 10:06:37 -08:00
bb4dff941d
Merge "Add API for proxy configuration over VPN."
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-01-24 17:52:22 +00:00
b11e29d4b3
Merge "Whitelist packages from VPN lockdown."
Pavel Grafov   authored and   Gerrit Code Review   commited 2019-01-24 17:34:55 +00:00
bec7854508
Whitelist packages from VPN lockdown.
Bug: 77468593
Test: atest com.android.server.connectivity.VpnTest
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: MixedDeviceOwnerTest#testAlwaysOnVpnAcrossReboot
Change-Id: I7f6c5b9172063b588feacd6b9930a6cb88f764ab
Merged-In: I7f6c5b9172063b588feacd6b9930a6cb88f764ab

Pavel Grafov   commited 2019-01-24 16:17:11 +00:00
f1a610a1c2