Commit graph android_packages_modules_Co.../core/java
Message SHA1
Merge "[KA03] Support tcp keepalive offload" am: 5f8ddc2eb1
am: 0bebdf2e1e

Change-Id: I695f8a96348b3033bd20a2a9d42ac9ee2bd485ad

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 22:32:01 -08:00
020998a27b
[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
am: 3527414d22

Change-Id: I242fdacdd70729367f60da80a1a27d8f5a08dff6

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 10:39:31 -08:00
cba6514494
[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
am: 79010e2cb5

Change-Id: I80f85170981c2f5b1ef949b5db88baf5fc101cd0

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-31 00:19:37 -08:00
50a6165fc3
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
am: 5ba51d8c7f

Change-Id: I42892bdacaa41f9cea7e653f0bb9b5497192e5f6

Mark Chien   authored and   android-build-merger   commited 2019-01-30 23:49:43 -08:00
9fc829242d
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 SystemApi for captive portal metrics" am: 4369ea8416
am: b4eab23249

Change-Id: I15adc597039539d53e5c08dc5f8cac74bcb0eda2

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

Change-Id: I7f0de294357ae6c691d38be52dd278eb37d42116

Pavel Grafov   authored and   android-build-merger   commited 2019-01-30 14:36:37 -08:00
59bdc241e3
Merge "Add SystemApi for captive portal metrics"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-30 22:24:12 +00:00
4369ea8416
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
1cf78de986
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
580483eb91
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
184600d0ad
Merge "Remove last NetworkStack usage of hidden APIs" am: 16ec5d038c
am: 0adf9260fc

Change-Id: I488fc028b8fd2aa5a09464082c65a4889a8a6b62

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-29 21:27:50 -08:00
6d834433ac
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
9e7e213995
Merge "Add NetworkUtils utilities to SystemApi" am: 9cc31061fe
am: 48af15ae8b

Change-Id: I978bdb626c1f4c8bbe736c8bad1c74fb6a67b4b5

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-29 03:29:01 -08:00
db8b553287
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
a5225eaf51
Merge "Add SocketUtils for NetworkStack" am: 75546d4e9d
am: 68a0c1de33

Change-Id: I89fe62b4baf63104359bb6741807bb2f1666cdd9

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-28 22:57:39 -08:00
dae2e37ce0
Merge "Whitelist packages from VPN lockdown." am: 2c13733fac
am: 4513467368

Change-Id: I10094606f74e6cdc5f4b0b6591cf776fd895b1d3

Pavel Grafov   authored and   android-build-merger   commited 2019-01-28 21:34:03 -08:00
a9c8b8a489
Merge "Add SocketUtils for NetworkStack"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-28 23:14:08 +00:00
75546d4e9d
Merge "Whitelist packages from VPN lockdown."
Pavel Grafov   authored and   Gerrit Code Review   commited 2019-01-28 20:15:49 +00:00
2c13733fac
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
6f08bb23a1
Merge "Move NetworkUtils used by NetworkStack" am: 1ee45c9bfb
am: 1e69c8baca

Change-Id: I0d6a40c79e92d1de18c41cc50b72fbe33db13bdc

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-28 01:30:17 -08:00
93bbacda97
Merge "Move NetworkUtils used by NetworkStack"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-28 09:06:20 +00:00
1ee45c9bfb
Merge "Add NetworkStack networking deps to SystemApi" am: 9188b49259
am: 05ec4875a0

Change-Id: I843cb189750666a2cb70b1960d49dfe797f3cf36

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-28 00:35:46 -08:00
f554e1392c
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
926e230392
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
d57b49cb4b
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
4753f40339
Merge "Revert "Whitelist packages from VPN lockdown."" am: 0246fc7f38
am: 3ffcc2d808

Change-Id: I933a58f97b48f7a2db372cff6fb43318c840c6f8

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

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

Change-Id: Iaf5c8aa4a8720eb2852da8cd91c81a77ccb92b68

Dan Albert   commited 2019-01-24 21:05:39 +00:00
bc9dd2b1aa
Merge "Add API for proxy configuration over VPN." am: a72ef3ff55
am: 6ff618c944

Change-Id: I51930e4ed99cc3df10db2c8bbef27989f0a06a46

Irina Dumitrescu   authored and   android-build-merger   commited 2019-01-24 10:20:32 -08:00
6cbfaa5bb4
Merge "Whitelist packages from VPN lockdown." am: 5bc0c4f1ca
am: abc3e7bd1f

Change-Id: I643fc2603f7cd2b928fe517eb473048004273835

Pavel Grafov   authored and   android-build-merger   commited 2019-01-24 10:06:37 -08:00
cd5753de76
Merge "Add API for proxy configuration over VPN."
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-01-24 17:52:22 +00:00
a72ef3ff55
Merge "Whitelist packages from VPN lockdown."
Pavel Grafov   authored and   Gerrit Code Review   commited 2019-01-24 17:34:55 +00:00
5bc0c4f1ca
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
b66ec9bbf7
Add API for proxy configuration over VPN.
Test: runtest -x
frameworks/base/tests/net/java/com/android/server/ConnectivityServiceTest.java
&& atest HostsideVpnTests
Bug: 76001058
Change-Id: Id4dde4a4103fd93bfbbacc52d0e5ade56ae67a6a
Merged-In: Id4dde4a4103fd93bfbbacc52d0e5ade56ae67a6a

Irina Dumitrescu   commited 2019-01-24 16:07:20 +00:00
0eafa0b5c8
Merge "Add additional SystemApi for NetworkStack" am: 962a145379
am: a60b0e6188

Change-Id: I5bdc50e7886731f61222bd1edd33765941118175

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-24 02:17:38 -08:00
371d617c4b
Merge "Add additional SystemApi for NetworkStack"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-24 09:55:01 +00:00
962a145379
Merge changes from topic "ka05" am: 908eb08326
am: 9a4614f4b0

Change-Id: I08979872a03c52e933daa39730fd71e998272613

Junyu Lai   authored and   android-build-merger   commited 2019-01-23 21:44:11 -08:00
ee5162e5b5
Merge changes from topic "ka05"
* changes:
  [KA05] Export keepalive offload api for IpSec Nat-T file descriptor
  [KA01] export SocketKeepalive API for NAT-T keepalive

Junyu Lai   authored and   Gerrit Code Review   commited 2019-01-24 05:06:39 +00:00
908eb08326
Merge changes I1250730c,I7d00848c am: c391533617
am: 0e12b04421

Change-Id: I31c9f6c11d0f52a34f68151fc2baca1921dcadad

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-23 08:40:50 -08:00
1cb4137701
[KA05] Export keepalive offload api for IpSec Nat-T file descriptor
Adds system api of createSocketKeepalive to take file descriptor,
so privileged apps could use it without the need of IpSecService.

Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: If926c21704b6ed73a0adfcadad732b97b42bacae

junyulai   commited 2019-01-24 00:40:25 +08:00
48a5938ee8
Add additional SystemApi for NetworkStack
Members in this CL were missed in earlier changes.

Test: m
Bug: 112869080
Merged-In: I8b5b80ea7b267357eb0387d504a2f78358d6d502
Change-Id: I8b9b15f8b91962f3ef554fd222a825e471806c9e

Remi NGUYEN VAN   commited 2019-01-24 01:01:13 +09:00
155b7b7342
[KA01] export SocketKeepalive API for NAT-T keepalive
The new set of API replace the PacketKeepalive system API
which is only specific for IPsec NAT-T keepalive packet. Allows
applications to request different types of keepalives through
the same set of API.

By using keepalives, applications could request system to
periodically send specific packets on their behalf, using
hardware offload to save battery power.

This change would only address interface change and test part of
original functionality. After all reference of PacketKeepalive
are removed, another change would be submitted to remove old
API.

Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: I3367666810acc44d5ad20e19acd4bf936e8b5d9c

junyulai   commited 2019-01-23 23:17:17 +08:00
a86defca11
Merge changes I1250730c,I7d00848c
* changes:
  Create a wrapper for IpClient
  Move IpClient to NetworkStack

Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-23 15:05:00 +00:00
c391533617
Merge changes from topic "Java async dns" am: 8c684211f0
am: 10fb7d86f8

Change-Id: I305cf0ae791f9503519884bdf382863002357ac7

Luke Huang   authored and   android-build-merger   commited 2019-01-23 01:14:34 -08:00
4757e61c18