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

Change-Id: I55d7b285a75946713986163fbaa166d4b02513d4

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 22:41:37 -08:00
a707d25603
[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
[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
[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.

(clean cherry-pick from aosp/860394)

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

Change-Id: Ia9917d12987e91e87e34ffb3f126e7bc7c9c187e

junyulai   authored and   Chalard Jean   commited 2019-02-04 04:06:22 +00:00
3a5caf833b
Merge "Add an API that allows VPNs to declare themselves as metered." am: fcfc88d14e am: 84bec449a3
am: f6a2a46752

Change-Id: I74c6eceaa7444d0cc79fac3b94151a1bdeb63037

Varun Anand   authored and   android-build-merger   commited 2019-01-30 20:11:09 -08:00
5df275d272
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
Add an API that allows VPNs to declare themselves as metered.
For VPN apps targeting Q and above, they will by default be treated as
metered unless they override this setting before establishing VPN.

Bug: 120145746
Test: atest FrameworksNetTests
Test: On device tests verifying meteredness setup correctly for apps
targeting Q and apps targeting P.
Change-Id: Ia6d1f7ef244bc04ae2e28faa59625302b5994875

Varun Anand   commited 2019-01-30 14:09:03 -08:00
5ccd6bd9e4
Tell the factory it is already serving a request.
This is a cherry-pick of ag/607226 that has been rebased on
top of four years of changes and with comments addressed.

Gives each factory a serial number and propogates it to every
NetworkAgent so when a score comes back indicating a request is
being handled the factory can account for it properly.

Without this, a new request that's already handled by a network
offered by a factory will not cause an increment of the factorys
ref count. Concretely this results in issues like the RAT icon
not being displayed in spite of the network actually being up
and usable.

This will be ported to AOSP as soon as possible, but immediately
some master-only WiFi tests need to be adjusted with this change
which would not let me submit to AOSP.

Bug: 18637384
Bug: 29030667
Test: manual
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks-net
Test: atest CtsNetTestCases CtsHostsideNetworkTests
Change-Id: I597ac588f76dd507512ff02868fd1310b7e63f7e

Chalard Jean   commited 2019-01-30 15:41:57 +09:00
7265562175
Merge "Remove last NetworkStack usage of hidden APIs" am: 16ec5d038c am: 0adf9260fc
am: 6d834433ac

Change-Id: I2059d9cfa3015388301a74828255354b6dc23c23

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-29 21:42:29 -08:00
7a45071808
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 "Whitelist packages from VPN lockdown." am: 2c13733fac am: 4513467368
am: a9c8b8a489

Change-Id: Ice1f8f27da3d0092af58c8e93969575ba9f8f925

Pavel Grafov   authored and   android-build-merger   commited 2019-01-28 22:13:24 -08:00
45e14f9576
Merge "Whitelist packages from VPN lockdown."
Pavel Grafov   authored and   Gerrit Code Review   commited 2019-01-28 20:15:49 +00:00
2c13733fac
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 "Move NetworkUtils used by NetworkStack"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2019-01-28 06:57:25 +00:00
fd36bc7e74
Move NetworkUtils used by NetworkStack
Depending on usage move into NetworkStackUtils or shared
Inet4AddressUtils.

Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
(Cherry-pick of aosp/881952)
Change-Id: Ie20dcee375b377236004a7689890729493aca857

Remi NGUYEN VAN   commited 2019-01-28 13:45:46 +09:00
4427014710
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
Merge "Add NetworkStack networking deps to SystemApi"
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2019-01-28 02:58:01 +00:00
29d41a316d
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
Add NetworkStack networking deps to SystemApi
Test: atest FrameworksNetTests
Bug: 112869080
Change-Id: Id59dc06fb85e4ac88098f56b621ec880610759ce

Remi NGUYEN VAN   commited 2019-01-25 09:05:58 +09:00
ae98229898
resolve merge conflicts of d7f2320945 to master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I7256999a13b713607cfb4c844bf1bc7b37b827a7

Dan Albert   commited 2019-01-24 14:46:02 -08:00
61bb568007
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."
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
Merge "Whitelist packages from VPN lockdown."
Pavel Grafov   authored and   Android (Google) Code Review   commited 2019-01-24 16:15:08 +00:00
a7789bb2f0
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 API for proxy configuration over VPN."
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2019-01-24 15:09:18 +00:00
4601fb3171
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

Irina Dumitrescu   commited 2019-01-24 12:54:19 +00:00
3a83884883
Merge "Popup a notification after logging in the captive portal network" am: 08bf40cfd1 am: 0c3a341e99
am: d2b0ad1fb5

Change-Id: I62b9ef24f3a7f9fe75450a05d19dffda3b84d4b5

Lucas Lin   authored and   android-build-merger   commited 2019-01-24 03:56:21 -08:00
9109b27996
Whitelist packages from VPN lockdown.
Bug: 77468593
Test: atest com.android.server.connectivity.VpnTest
Test: atest MixedDeviceOwnerTest#testAlwaysOnVpn
Test: MixedDeviceOwnerTest#testAlwaysOnVpnAcrossReboot
Change-Id: I7f6c5b9172063b588feacd6b9930a6cb88f764ab

Pavel Grafov   commited 2019-01-24 11:34:17 +00:00
a2f5288aed
Merge "Popup a notification after logging in the captive portal network"
Lucas Lin   authored and   Gerrit Code Review   commited 2019-01-24 11:06:12 +00:00
08bf40cfd1
Popup a notification after logging in the captive portal network
Captive portal app will be auto dismissed after user login the
captive portal network. In order to improve the user experience,
popup a notification to notify user that the captive portal
network is connected.

Bug: 113629026
Test: 1.atest FrameworksNetTests:NetworkNotificationManagerTest
      2.Connect to a captive portal network and login, check if
      there is a notification popup.

Change-Id: Id54d12268e107af2f213c2bb348c5f7908e880f4

lucaslin   commited 2019-01-24 15:55:30 +08:00
1ac7239053
Merge changes from topic "ka05" am: 908eb08326 am: 9a4614f4b0
am: ee5162e5b5

Change-Id: Ie56c431a6d934c752d1de30fc4bf98a7e557e5b2

Junyu Lai   authored and   android-build-merger   commited 2019-01-23 22:24:41 -08:00
56277ab83f
[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
Merge "Stop depending on the ConnectivityService default request." am: af9048348f am: db0eb579ee
am: 237cbb7b83

Change-Id: Ia3730d55442da165b779242a35c7c66bd0d9b8fe

Lorenzo Colitti   authored and   android-build-merger   commited 2019-01-23 08:36:21 -08:00
ce00c34e01
[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 "Stop depending on the ConnectivityService default request."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2019-01-23 12:29:40 +00:00
af9048348f
Stop depending on the ConnectivityService default request.
This avoids the need to expose ConnectivityService implementation
details as @SystemApi and the complexities that would be required
to make NetworkCapabilities parcelable in stable AIDL.

Bug: 112869080
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: Icd5d25b9b8e9b7a7d1899b000c92dc4976c3b3d7

Lorenzo Colitti   commited 2019-01-23 18:10:06 +09:00
4d4798edba
Merge changes If71fadd2,I42047185 am: a5ca09f7ce am: 0b8d5e2217
am: 5a79e49e8d

Change-Id: Ia91e6eac1b53fabb018fb4e1f689bb986e895ca4

Chalard Jean   authored and   android-build-merger   commited 2019-01-22 15:29:37 -08:00
ad716115c8
Merge changes If71fadd2,I42047185
* changes:
  [MS10] Address leftover comments on MS03 and MS07
  [MS09] Implement isSameNetwork.

Chalard Jean   authored and   Gerrit Code Review   commited 2019-01-22 22:50:21 +00:00
a5ca09f7ce
Merge "Add API for VPN apps to query always-on and lockdown." am: c9ea55c3f7 am: 721dbccad1
am: ec53cd06b0

Change-Id: Ied8e5a01cdf76d8da02d2dc292943e6a559cc84e

Pavel Grafov   authored and   android-build-merger   commited 2019-01-22 07:19:18 -08:00
833939a5c9
Merge "Add API for VPN apps to query always-on and lockdown."
Pavel Grafov   authored and   Gerrit Code Review   commited 2019-01-22 14:43:06 +00:00
c9ea55c3f7
[MS09] Implement isSameNetwork.
Test: Old tests pass, new tests pass too.
Bug: 113554482

Change-Id: I420471853f3fab7725cba7ae500cebdce1912e43

Chalard Jean   commited 2019-01-22 19:10:48 +09:00
e4ff75ecc2
Merge "Add NetworkStack metrics to system API" am: 8fada525d2 am: 2102e2d628
am: d093468b8d

Change-Id: I848ac4c2bb8d35a2f756f97e57f9a61698c00f57

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-22 00:28:03 -08:00
9cdb11422a
Merge "Add NetworkStack metrics to system API"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-22 07:48:39 +00:00
8fada525d2
Merge "Properly expect all callbacks in testStackedLinkProperties." am: 4129d435c1 am: 6d8a63cf80
am: 6fb16a0ef0

Change-Id: I615f412f7696752d867337ab5cbabe24daea2ed3

Lorenzo Colitti   authored and   android-build-merger   commited 2019-01-21 23:00:00 -08:00
4782b60702
Properly expect all callbacks in testStackedLinkProperties.
Currently testStackedLinkProperties accounts for some of the
NetworkCallbacks that are fired, but not all of them. The test
passes because it only ever expects LinkProperties changed
callbacks (and not, e.g., lost callbacks), because it uses
waitForIdle(), and because at the end, when the callback is
unregistered, it does not call assertNoCallback().

Add the missing callback expectation and expect a LOST callback
at the end. Also add an assertNoCallback, even though it's not
strictly necessary. Remove all the waitForIdle statements, which
are no longer necessary because every assertion happens after
waiting for a callback.

Making the expectations more precise in a separate CL will help
ensure that upcoming changes to this code don't break anything,
and will make said changes easier to review.

Bug: 65674744
Test: atest FrameworksNetTests
Test: ConnectivityServiceTest#testStackedLinkProperties passes 400 times
Change-Id: I73cda0dd029a0e6546f7272beedf841ce5a4c0dc

Lorenzo Colitti   commited 2019-01-22 10:53:00 +09:00
46eae8a765
Add NetworkStack metrics to system API
Test: atest FrameworksNetTests NetworkStackTests
Bug: 112869080
Change-Id: Ie52c55f248c173e2a5ee603ecd004fbac9004ac1

Remi NGUYEN VAN   commited 2019-01-21 23:24:41 +00:00
737c49d78e