Commit graph android_packages_modules_Co.../tests/net/java/android
Message SHA1
Add common tests for FrameworksBaseTests and CTS
The common package covers tests that should be included both in CTS and
unit tests.

Test: atest FrameworksBaseTests
Bug: 129199908
Change-Id: Ic78ff947250871fa773252c924f1dee9395c6074
(cherry picked from commit 054e3e0f5ebfffe5d9fdd0095abac309552ae0cd)

Remi NGUYEN VAN   commited 2019-04-05 05:52:03 +00:00
fb21e4697b
Merge "Fix IpPrefixTest#testContainsInetAddress fail." am: 9c58ddc48e am: b9cffc513e
am: 736189fc88

Change-Id: I9e74dc9bf30a53ce78395e502a52891ba488f4b1

Paul Hu   authored and   android-build-merger   commited 2019-04-01 19:24:38 -07:00
777b96dcad
Fix IpPrefixTest#testContainsInetAddress fail.
The argument of IpPreFix#contains() has been marked as @NonNull.
So the IpPrefixTest#testContainsInetAddress should not test
contains() method wiht null object.

Bug: None
Test: atest FrameworksNetTests
      atest IpPrefixTest#testContainsInetAddress

Change-Id: I2f6bee19514dc47702f64d2a2bbf02d8b7b1b407

paulhu   commited 2019-04-02 00:49:00 +08:00
207037a243
Merge "Add DHCP address lease expiry in IpMemoryStore." am: 98aa76e2e8 am: bdb1f90f32
am: 77bd196428

Change-Id: Ib09ee6a702fb25a682d4782a8822237ebb9a0dfb

Xiao Ma   authored and   android-build-merger   commited 2019-04-01 06:35:34 -07:00
2476c3f532
Add DHCP address lease expiry in IpMemoryStore.
Bug:122710829
Test: atest FrameworksNetTests
Change-Id: I643fe1231edcd18923514ab66c64a6cf83e69443

Xiao Ma   commited 2019-03-29 16:51:47 +09:00
3c33ee5d81
Merge changes from topic "vpn_data_accounting"
* changes:
  Move BatteryStats and StatsCompanionService to use NetworkStatsService.
  NetworkStatsService: Fix getDetailedUidStats to take VPNs into account.
  Take all VPN underlying networks into account when migrating traffic for VPN uid.

Varun Anand   authored and   Gerrit Code Review   commited 2019-03-29 00:40:53 +00:00
06b4b6f92e
NetworkStatsService: Fix getDetailedUidStats to take VPNs into account.
This API is similar to one provided by NetworkStatsFactory with the
difference that NSS also migrates traffic from VPN UID to other apps.

Since traffic can only be migrated over NetworkStats delta, NSS
therefore maintains NetworkStats snapshot across all UIDs/ifaces/tags.

This snapshot gets updated whenever NSS records a new snapshot
(based on various hooks such as VPN updating its underlying networks,
network getting lost, etc.), or getDetailedUidStats API is invoked by
one of its callers.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: manually verified that battery stats are migrating traffic off of
TUN (after patching above CL where we point BatteryStats to use this
API).
Change-Id: Ib0f0c2d4d41ee1d7a027ea9da457baaf198d649e

Varun Anand   commited 2019-03-28 10:31:51 -07:00
2af0b66aba
Take all VPN underlying networks into account when migrating traffic for
VPN uid.

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: Manually verified on device that stats from VPN UID are moved
      appropriately based on its declared underlying network set.
Test: vogar --mode app_process --benchmark NetworkStatsBenchmark.java

Change-Id: I9d8d0cc58d18002c1c96f8ddff780ef8dc452d21

Varun Anand   commited 2019-03-28 10:31:49 -07:00
612520f544
Merge "[TCPKeepalive] Fill correct TOS and TTL value" am: 13cc9e442e am: 52ffa51e7f
am: 73062f4600

Change-Id: I80c56a14a0be2e6b7996f2bcb9a1a320f0c2c058

Mark Chien   authored and   android-build-merger   commited 2019-03-25 06:44:17 -07:00
f2a195cad0
[TCPKeepalive] Fill correct TOS and TTL value
Fill correct TOS/TTL value by fetching them from kernel with
getsockopt.

bug: 123967966
Test: -build, flash, boot
      -atest FrameworksNetTests

Change-Id: I75b1be51040b4a381163958b4cddd27dbb22bac1

markchien   commited 2019-03-25 11:14:57 +08:00
b5a2b8076a
Merge "Fix Automated API Review issues." am: acb5eca325 am: f1f3b08982
am: affa3f497d

Change-Id: Iba1630161579571d4975aba9bbd5c767f82c8a98

Paul Hu   authored and   android-build-merger   commited 2019-03-21 11:54:51 -07:00
2e2bc9c173
Merge "Fix Automated API Review issues."
Paul Hu   authored and   Gerrit Code Review   commited 2019-03-21 17:19:26 +00:00
acb5eca325
Merge "Replace TcpSocketInfo with similar structure" am: a460377cf9 am: bee0fa077b
am: 846e87b170

Change-Id: I9b51e6905245ada2707ef7498cc1b8e4cb4c69a0

Mark Chien   authored and   android-build-merger   commited 2019-03-21 05:35:15 -07:00
3fd041d2ec
Fix Automated API Review issues.
1. Some API's argument/return value must be marked either
@NonNull or @Nullable.
2. Change some system APIs to public APIs.
3. Modify the method name

Bug: 126700123
Bug: 126702339
Bug: 126699682
Bug: 118296575
Bug: 126699216
Bug: 126699675
Bug: 126699429
Bug: 126699193
Bug: 123586045
Test: atest FrameworksNetTests
Change-Id: Iaa2832cdcf83758ed0fec81b954a0c63bc5a7bf6

paulhu   commited 2019-03-21 13:55:37 +08:00
cbbc3db924
Replace TcpSocketInfo with similar structure
Replace TcpSocketInfo with TcpKeepalivePacketDataParcelable
because their structures are very similar.

bug: 128882321
Test: -build, flash, boot
      -FrameworksNetTests

Change-Id: Iafb4031a64ba4775a495c156e2c997d890c6b261

markchien   commited 2019-03-20 22:29:48 +08:00
458c95b9ff
Merge "Add Parcelable implementation for ApfCapabilities" am: d64b329979 am: 57b7aa8ec2
am: 84890d80e0

Change-Id: I4d878b8dc0928aca47f944050becaa4d5206e336

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-03-19 18:09:23 -07:00
b71b242e7e
Merge "Add Parcelable implementation for ApfCapabilities"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-03-20 00:34:53 +00:00
d64b329979
Merge "Move the IpMemoryStore to the network stack." am: edb899fcf8 am: 61e928c7cd
am: 78e3f9ab7d

Change-Id: I243056012d2f099d96a33657c0eb63a5b66a2cfe

Xiao Ma   authored and   android-build-merger   commited 2019-03-19 06:54:43 -07:00
cefa778aa4
Move the IpMemoryStore to the network stack.
Test: atest FrameworksNetTests
Change-Id: Ic5bd6ff54b09a6fa92b6863f240a5b053011acb6

Chalard Jean   authored and   Xiao Ma   commited 2019-03-18 11:33:17 +09:00
4ae71e9ebc
Add Parcelable implementation for ApfCapabilities
This is necessary to allow usage of ApfCapabilities as-is in AIDL,
instead of relying on ApfCapabilitiesParcelable, assuming that stable
AIDL starts allowing usage of @SystemApi classes. The Parcelable
implementation would be convenient for clients in any case.

Bug: 126477266
Test: atest FrameworksNetTests
Change-Id: Id2ef3cad261832a2918ccb6bb6bc154d99d75746

Remi NGUYEN VAN   commited 2019-03-15 13:41:59 +09:00
df04297b86
Merge "Check if network has partial connectivity" am: 2d3cc4577a am: 0ea87a4edb
am: 973a569390

Change-Id: Ib6c5ecc8238e1ac237eddcc00802fa5e7c0e24b9

Lucas Lin   authored and   android-build-merger   commited 2019-03-12 01:47:25 -07:00
1f01518b68
Check if network has partial connectivity
In some networks, network validation may only get success
result for http probe but fail result for https probe.
For this kind of network, it may still work at some websites
or apps, but user didn't know about that. In order to fix this
issue, we will check if network has partial connectivity and
notify user to make a choice if they want to use this partial
connectivity or not.

Bug: 113450764
Test: 1. Build pass.
      2. Fake partial connectivity case for testing.
      3. atest FrameworksNetTests
      4. atest NetworkStackTests

Change-Id: I69ed00ac4850904ff708c9fef22e148879a10e92

lucaslin   authored and   Lucas Lin   commited 2019-03-12 07:37:33 +00:00
2240ef679d
Merge "Migrate frameworks/base/tests/net/ to androidx.test" am: e69a7a1554 am: 29e6ab8d01
am: 38f02479d6

Change-Id: I01657671712799f5a29a3a7530430cc5bfb14f41

Brett Chabot   authored and   android-build-merger   commited 2019-03-06 22:10:32 -08:00
8e95e2105d
Migrate frameworks/base/tests/net/ to androidx.test
Test: atest FrameworksNetTests
Change-Id: Iaa59d606f5e1678cc5aaca9ed37e184fad894e5d

Brett Chabot   commited 2019-03-05 09:05:47 -08:00
147f6cf341
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
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
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
Merge changes I2ddfef0c,I49bee0c9 am: 1feafc2e2a am: ae62bfc346
am: 16e7e25468

Change-Id: I369bf5d92a3f70e789043d33bcbc85099aebbb69

Chalard Jean   authored and   android-build-merger   commited 2019-01-21 11:28:55 -08:00
999ca436ed
[MS08] Read back attributes and blobs.
Test: New tests in IpMemoryStore
Bug: 113554482

Change-Id: I2ddfef0c2ed37459c038f75d1dfc92fdefbf58f5

Chalard Jean   commited 2019-01-21 15:21:09 +09:00
b8997229ad
Merge changes Iec53a9fd,Iac4cfe70 am: 8621e44c39 am: 4a4e693e3e
am: 9d98567b3c

Change-Id: Ie225d000aeafb4a0b1e3910967c619fd932f239f

Lorenzo Colitti   authored and   android-build-merger   commited 2019-01-16 02:03:06 -08:00
2b889d5ddf
Merge "Add the NAT64 prefix to LinkProperties." am: 983e77db4a am: 6b39032761
am: 9281e5c55f

Change-Id: I53948d2c3f50b9973e5b9483cf172b5932028f51

Lorenzo Colitti   authored and   android-build-merger   commited 2019-01-14 20:40:25 -08:00
0354d07f69
Test parceling empty LinkProperties.
Test: atest FrameworksNetTests
Change-Id: Iec53a9fdce1ba1db86751ea5f14a11d28be543eb

Lorenzo Colitti   commited 2019-01-15 12:53:59 +09:00
1d3bf3d90c
Add the NAT64 prefix to LinkProperties.
Currently we support exactly one NAT64 prefix. This matches what
other components in the system (Dns64Configuration, clatd, etc.)
support.

Test: atest FrameworksNetTests
Change-Id: I45a11cebe43a5e1c60d50eca7889cb317565b598

Lorenzo Colitti   commited 2019-01-12 02:16:34 +09:00
981b34f6b8
Merge changes from topic "IPMS1" am: 3627deac88 am: 946d156bce
am: 6452604181

Change-Id: I6908f68b1b9e7079384c4cc9f11c4e46cce694ce

Chalard Jean   authored and   android-build-merger   commited 2019-01-11 04:13:38 -08:00
ee81197cf2
[MS02] Write the skeleton for the IP memory store.
This implements a minimal contract for the IP Memory Store
feature.

Test: Created new tests for parcelable code. For the rest, created
      empty tests, but there is no logic, it's boilerplate day
Bug: 116512211
Change-Id: I15dc6275b370d671385ddfdb058a8b8d39952d6e

Chalard Jean   commited 2019-01-11 15:01:00 +09:00
6dd2486300
[MS01] Add the IP memory store service.
Bug: 116512211
Test: Added initial tests
Change-Id: I9d9af4097e3e2d7afd9956b9cbfa29a9f9558ae0

Chalard Jean   commited 2019-01-11 15:00:36 +09:00
d3829de504
Merge "Add PCSCF to LinkProperties." am: a99e1eeb9d am: aad967ed2a
am: a0b40fe2e7

Change-Id: I16eedc51ad4932b7ec6a32d9e718c48cf203c2f0

Chalard Jean   authored and   android-build-merger   commited 2019-01-09 22:29:15 -08:00
405ef49ce6
Merge "Add PCSCF to LinkProperties."
Chalard Jean   authored and   Gerrit Code Review   commited 2019-01-10 05:55:05 +00:00
a99e1eeb9d
Merge "Ignore ipv6 tx traffic on clat uid." am: 926c915708 am: 4d2e21a86c
am: 88539d94e3

Change-Id: I1ac85ac863026ea99117c5b0115bcc0c9144fb7b

Junyu Lai   authored and   android-build-merger   commited 2019-01-04 08:47:41 -08:00
453c09eec1
Merge "Ignore ipv6 tx traffic on clat uid."
Junyu Lai   authored and   Gerrit Code Review   commited 2019-01-04 09:29:10 +00:00
926c915708
Merge "[CM] Fix comments, add tests to TransportInfo API" am: 4060bc1480 am: 4e20619d98
am: b03827647f

Change-Id: I0a81b7b48bb02da202dd7feaa1440801b794ce67

Etan Cohen   authored and   android-build-merger   commited 2018-12-11 22:22:36 -08:00
1457e13e50
[CM] Fix comments, add tests to TransportInfo API
Bug: 117605977
Test: atest NetworkCapabilitiesTest
Change-Id: I734ec56e44cd09d11ae81a856a53a26e1191b9a0

Etan Cohen   commited 2018-12-11 15:00:10 -08:00
73fb5a86f0
Merge "Refactoring of deleting stats in NetworkStats based on uids." am: 12924cb23b am: f348c8d8a9
am: bc661e2a6e

Change-Id: I29c57276424464afd54e184c369d30a5e9707f14

Junyu Lai   authored and   android-build-merger   commited 2018-12-10 03:10:15 -08:00
20775e7c92