Commit graph android_packages_modules_Co.../tests/net/java
Message SHA1
Merge "Update VPN capabilities when its underlying network set is null." am: c7702baa80 am: 07fff8eb3c
am: 30714647b4

Change-Id: I6dd5a369f1a3b74bbf498051ef1e4d1b31bd8e5e

Varun Anand   authored and   android-build-merger   commited 2019-02-15 04:11:55 -08:00
bbefd325bc
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
c7702baa80
Merge "Move NetworkStack to services.net"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-15 10:52:03 +00:00
4616612b6b
Merge "Move NetworkStack to services.net"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2019-02-15 07:25:09 +00:00
14aff42bdf
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
ef59a21ff4
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
df56995870
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

Remi NGUYEN VAN   commited 2019-02-14 20:43:43 +09:00
b6997cc4da
Merge "Fix flaky testNattSocketKeepalives" am: 9a9e288607 am: ec2b289d42
am: 5dd6eb9d15

Change-Id: Ibfdd4dddb8dad9ee26f9f1ec175ca87bc46ce761

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-13 21:45:39 -08:00
c6b0f1a86b
Merge "Fix flaky testNattSocketKeepalives"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-02-14 03:29:00 +00:00
9a9e288607
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
b76f9ee4e6
Merge "Remove hard-coded NetworkStack package name" am: 694dd4a5e2 am: e6fbb4664f
am: 43d71b08f5

Change-Id: Ic93c22e03a4ead4ec37b955993a32c8ce284e0a6

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-02-11 20:44:47 -08:00
a18c91cc73
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
794c7f2ee3
Merge "[KA03.5] Add stable AIDL parcelable for TcpKeepalivePacketData" am: 6e55aca3fa am: 90cad47708
am: aa12af640b

Change-Id: I700550160c795becb4c3e37a88328488846d272f

Chalard Jean   authored and   android-build-merger   commited 2019-02-06 01:47:49 -08:00
cd6d2a46eb
Merge "[KA03] Support tcp keepalive offload" am: 5f8ddc2eb1 am: 0b93464e32
am: d6cedf5ed3

Change-Id: I55d7b285a75946713986163fbaa166d4b02513d4

Chalard Jean   authored and   android-build-merger   commited 2019-02-05 22:41:37 -08:00
a627caa478
[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
[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
[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
1fb0c95661
Merge "Add an API that allows VPNs to declare themselves as metered." am: 35200a3b8a am: d4bdf28a26
am: ef0938774d

Change-Id: I74c6eceaa7444d0cc79fac3b94151a1bdeb63037

Varun Anand   authored and   android-build-merger   commited 2019-01-30 20:11:09 -08:00
262381fcdc
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
35200a3b8a
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
83759ee94b
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
768ea1206d
Merge "Remove last NetworkStack usage of hidden APIs" am: 16ec5d038c am: 19542eea9e
am: b7829c8fec

Change-Id: I2059d9cfa3015388301a74828255354b6dc23c23

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-29 21:42:29 -08:00
f71c4dfb77
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 "Whitelist packages from VPN lockdown." am: 76e3e0052c am: f6c5ef95d1
am: e4dab6797f

Change-Id: Ice1f8f27da3d0092af58c8e93969575ba9f8f925

Pavel Grafov   authored and   android-build-merger   commited 2019-01-28 22:13:24 -08:00
0d31afb2a0
Merge "Whitelist packages from VPN lockdown."
Pavel Grafov   authored and   Gerrit Code Review   commited 2019-01-28 20:15:49 +00:00
76e3e0052c
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 "Move NetworkUtils used by NetworkStack"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2019-01-28 06:57:25 +00:00
b19997dbe9
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
98d9df7a9b
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
Merge "Add NetworkStack networking deps to SystemApi"
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2019-01-28 02:58:01 +00:00
1e67080e20
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
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
b432c2c45c
resolve merge conflicts of 511c26364f 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
dfaba10dba
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."
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
Merge "Whitelist packages from VPN lockdown."
Pavel Grafov   authored and   Android (Google) Code Review   commited 2019-01-24 16:15:08 +00:00
affdbb9b26
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
de132bb6d6
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
f2cef662ec
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
8767f41688
Merge "Popup a notification after logging in the captive portal network" am: 01eeab4954 am: 37f5d453ee
am: 3037c709a7

Change-Id: I62b9ef24f3a7f9fe75450a05d19dffda3b84d4b5

Lucas Lin   authored and   android-build-merger   commited 2019-01-24 03:56:21 -08:00
b723dfe0de
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
58e8be00ee
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
01eeab4954
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
b1e8e385dd
Merge changes from topic "ka05" am: 455df13823 am: 81a501ea8d
am: 3f899a7fdb

Change-Id: Ie56c431a6d934c752d1de30fc4bf98a7e557e5b2

Junyu Lai   authored and   android-build-merger   commited 2019-01-23 22:24:41 -08:00
d412f97c5d
[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
d05a192fbe