Commit graph android_packages_modules_Co.../tests/unit/java
Message SHA1
Merge "Support ignoring validation failures after roam." am: 004cbbcdad am: 2c4ba92b72
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2026185

Change-Id: Idd06e199b884b2f8d6d75b0d2207b4f5a7641067

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2022-03-18 03:56:44 +00:00
3dad0783fd
Merge "Support ignoring validation failures after roam."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-18 03:15:49 +00:00
004cbbcdad
Support ignoring validation failures after roam.
In some scenarios, Wi-Fi connectivity is disrupted after roam. If an application reacts to network errors by calling reportNetworkConnectivity(false), validation will immediately fail and the device will switch to cell data.

Add a way to ignore these validation failures for up to 10 seconds after Wi-Fi roams.

Bug: 216567577
Test: new unit tests

Change-Id: I58de486533bcc7c6e32b23536ae15bccb779e394

he_won.hwang   commited 2022-03-18 10:30:28 +09:00
881307a834
Merge changes from topic "nullable-ipconfig" am: 1b13af010a am: 3a74a64079
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2026565

Change-Id: Idd172582e5d1f0d401b999b7eb8f1a5e5311ee5d

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-03-17 08:13:58 +00:00
5a9011125b
Merge changes from topic "nullable-ipconfig"
* changes:
  Add test for nullable IpConfiguration
  Add Nullable IpConfiguration to ethernet update request
  Replace assertParcelSane with assertParcelingIsLossless

Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-17 06:17:02 +00:00
1b13af010a
Add test for nullable IpConfiguration
Test: atest EthernetNetworkUpdateRequestTest
Change-Id: Ibf565d46cfac0d44976ee6187db7234bb082da41

Patrick Rohr   commited 2022-03-16 20:29:10 +01:00
fb82c3f702
Merge "Use int array for included and excluded uids" am: 2ccbfe9d8f am: 8b0350f4b6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2018920

Change-Id: I73373faabcf62add0703854b3cf8fb35668b197d

Sooraj Sasindran   authored and   Automerger Merge Worker   commited 2022-03-16 18:58:04 +00:00
3f32e9e066
Rename setAccessUids to setAllowedUids
Bug: 217725769
Test: ConnectivityServiceTest CtsNetTestCases
Change-Id: Ic8a3f91553d1462b7f54259c467fb90a950bdd59
Merged-In: I8860fbb353eedf5d01e9dc248e4d765046bd562c

Chalard Jean   authored and   Sooraj Sasindran   commited 2022-03-16 17:58:20 +00:00
de665266cd
Merge "Use int array for included and excluded uids"
Sooraj Sasindran   authored and   Gerrit Code Review   commited 2022-03-16 17:56:08 +00:00
2ccbfe9d8f
Replace assertParcelSane with assertParcelingIsLossless
Per review comment on aosp/2012897.

Test: atest EthernetNetworkUpdateRequestTest
Change-Id: Ie2f21d821709cc82af9294d70826f153506fda4f

Patrick Rohr   commited 2022-03-16 17:20:36 +01:00
ceae88da2d
Merge changes from topic "ethernet_mainline"
* changes:
  Fix the NPE thrown when starting Ethernet service in OS lower than T.
  Remove the stub ethernet service from Connectivity module.
  Update hidden API files for EthernetManager API move.
  Provide a stub ethernet service to build in sc-mainline-prod.
  Build ethernet framework source into framework-connectivity-tiramisu

Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-16 16:03:30 +00:00
6dde8ac532
Use int array for included and excluded uids
Use int array for included and excluded uids so that uses
same data type as in PreferentialNetworkServiceConfig

Bug: 217365439
Test: ran connectivity service unit tests
Change-Id: I9ac7e6498df2fd20b8397b2c110296e019c7389e

Sooraj Sasindran   commited 2022-03-16 07:19:11 +00:00
4904176454
Rename setAccessUids to setAllowedUids
Bug: 217725769
Ignore-AOSP-First: Due to dependency on Telephony code which is not in
AOSP
Test: ConnectivityServiceTest CtsNetTestCases

Change-Id: I8860fbb353eedf5d01e9dc248e4d765046bd562c

Chalard Jean   authored and   Sooraj Sasindran   commited 2022-03-16 06:29:27 +00:00
7d72b41c95
Merge "Rename setUidForeground to noteUidForeground" am: 8b7896b51a am: cf9f545864
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2018880

Change-Id: I8a3ac0a4dcf9201435ad227b36acf4e0f1889f22

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2022-03-16 00:37:29 +00:00
f2975db5a4
Merge "Rename setUidForeground to noteUidForeground"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-15 23:33:26 +00:00
8b7896b51a
Build ethernet framework source into framework-connectivity-tiramisu
- move ethernet APIs, build it into framework-connectivity-tiramisu
- start ethernet service from ConnectivityServiceInitializer
- fix EthernetManager dependnecy in Tethering module
- fix EthernetNetworkSpecifier dependency in framework-connectivity
- fix the ethernet related config resource

Bug: 210586283
Test: m
Test: atest FrameworksNetTests EthernetServiceTests
Change-Id: I54857b8517649048a343c72797668394d5225766
Merged-In: I54857b8517649048a343c72797668394d5225766

Xiao Ma   commited 2022-03-14 14:06:35 +00:00
0a171c006c
Build ethernet framework source into framework-connectivity-tiramisu
- move ethernet APIs, build it into framework-connectivity-tiramisu
- start ethernet service from ConnectivityServiceInitializer
- fix EthernetManager dependnecy in Tethering module
- fix EthernetNetworkSpecifier dependency in framework-connectivity
- fix the ethernet related config resource

Bug: 210586283
Test: m
Test: atest FrameworksNetTests EthernetServiceTests
Ignore-AOSP-First: Topic of Ethernet Mainline has merge conflict with
                   master, merge this CL first and cherry-pick it back.
Change-Id: I54857b8517649048a343c72797668394d5225766

Xiao Ma   commited 2022-03-10 20:57:38 +09:00
eaaf7d3a83
Rename setUidForeground to noteUidForeground
Addresses API review feedback. Both setUidForeground in
NetworkStatsManager and NetworkStatsService are renamed to
noteUidForeground. Thus, the caller in test should be also
modified.

Bug: 222291301
Test: atest FrameworksNetTests
Change-Id: Ifa1e1af3d9fd8b1dc75a8f37947a5958f60ed415

Aaron Huang   commited 2022-03-10 18:33:50 +08:00
5417280f17
Merge "Add test for EthernetNetworkUpdateRequest" am: 6758a5dfff am: 396091b4b1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2012897

Change-Id: I3caea7ea56c7b020c3a13ecfe5e8978960b37a88

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-03-09 10:12:36 +00:00
2f9ab72177
Merge "Add test for EthernetNetworkUpdateRequest"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-09 09:16:29 +00:00
6758a5dfff
Merge "Split updateMeteredNetwork{Allow, Deny}List into add and remove" am: cc29690fc1 am: 9eb82805bc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2005313

Change-Id: Ie33ff8b5f6582005e59964d4c255f538e88441ef

Mark Chien   authored and   Automerger Merge Worker   commited 2022-03-09 05:45:14 +00:00
3b654e8781
Merge "Split updateMeteredNetwork{Allow, Deny}List into add and remove"
Mark Chien   authored and   Gerrit Code Review   commited 2022-03-09 05:00:58 +00:00
cc29690fc1
Split updateMeteredNetwork{Allow, Deny}List into add and remove
Split the updateXXX methods into an addXXX and removeXXX instead of using
a boolean parameter to indicate whether the uid should be added or removed

Bug: 218494748
Test: atest FrameworksNetTests
Change-Id: I868cf35c8f51b25d8719e618c6c48a5cd642da7f

markchien   commited 2022-03-09 11:17:27 +08:00
e46042b833
Add test for EthernetNetworkUpdateRequest
Test: atest EthernetNetworkUpdateRequest
Change-Id: I2aeacca81f07cf2d73814d20fc9e63e9f1a65843

Patrick Rohr   commited 2022-03-08 16:29:43 +01:00
30d33f4ee3
Merge "Remove ConnectivityManager swapActiveStatsMap API" am: 5635d505e0 am: cab6183ca4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2002453

Change-Id: I4813a1fd9f78970e989dea3044c3d06163fb338d

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-03-08 07:31:38 +00:00
790f97cc6d
Merge "Remove ConnectivityManager swapActiveStatsMap API" am: 5635d505e0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2002453

Change-Id: Id16667ee77babbaa13ac740853f16693cd1d54fb

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-03-08 06:57:00 +00:00
cab6183ca4
Merge "Merge Android 12L"
Xin Li   authored and   Gerrit Code Review   commited 2022-03-08 06:55:42 +00:00
e6953d54a5
Merge "Remove ConnectivityManager swapActiveStatsMap API"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-03-08 06:31:23 +00:00
5635d505e0
Merge changes Id5f5bdfc,I67b9f30b am: 984c39992c am: c5f5bc136b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2007090

Change-Id: I1688412e0796c261a18fdb3273a0f185fc93d870

Maciej Å»enczykowski   authored and   Automerger Merge Worker   commited 2022-03-08 01:45:21 +00:00
6aba5c87e4
Merge changes Id5f5bdfc,I67b9f30b am: 984c39992c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2007090

Change-Id: I61c9c590cf2c6cf1afbd9f6898ad928199d16eaf

Maciej Å»enczykowski   authored and   Automerger Merge Worker   commited 2022-03-08 01:12:10 +00:00
c5f5bc136b
Merge changes Id5f5bdfc,I67b9f30b
* changes:
  [CLATJ#32] ClatCoordinator: untag clat raw socket
  [CLATJ#31] ClatCoordinator: tag raw socket to uid AID_CLAT

Maciej Å»enczykowski   authored and   Gerrit Code Review   commited 2022-03-08 00:47:17 +00:00
984c39992c
Merge "Don't attempt to enable rate-limiting before T." am: 33f4e14073
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2010337

Change-Id: If26026f57421c51eb34f38c82229fd524b734299

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-03-07 16:17:40 +00:00
23037308c6
Merge "Don't attempt to enable rate-limiting before T." am: 33f4e14073 am: 5349730cb2
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2010337

Change-Id: If3117ad8e8d517a22c8cdf237fe1cb41d75ee414

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-03-07 16:08:07 +00:00
3940ca1bc1
Merge "Remove dead code in BpfNetMaps." am: e06458378d am: 8f35671e7e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2008696

Change-Id: I79f0349840021b075ebf5bd6c6575bd36b260a96

Mark Chien   authored and   Automerger Merge Worker   commited 2022-03-07 16:07:57 +00:00
c246c8248d
Merge "Don't attempt to enable rate-limiting before T." am: 33f4e14073
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2010337

Change-Id: Icfb9ea592a272d41a781906f523f66ad5222076b

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-03-07 15:55:50 +00:00
5349730cb2
Merge "Don't attempt to enable rate-limiting before T."
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-03-07 15:51:32 +00:00
33f4e14073
Merge "Remove dead code in BpfNetMaps." am: e06458378d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2008696

Change-Id: I095832611b0b17c0f6158f2d5ea6e84f21cc9731

Mark Chien   authored and   Automerger Merge Worker   commited 2022-03-07 15:45:09 +00:00
8f35671e7e
Merge "Remove dead code in BpfNetMaps." am: e06458378d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2008696

Change-Id: I1d44c652972e43f6598fcb231bdc538e3836a046

Mark Chien   authored and   Automerger Merge Worker   commited 2022-03-07 15:44:27 +00:00
1e048b4432
Don't attempt to enable rate-limiting before T.
Rate-limiting cannot work because the BPF program is in the
mainline version of netd.c, which is placed into net_shared
and thus cannot run pre-T.

Disable it entirely to ensure no impact on S.

Test: atest ConnectivityCoverageTests:com.android.server.ConnectivityServiceTest on AOSP
Test: atest ConnectivityCoverageTests:com.android.server.ConnectivityServiceTest on S
Change-Id: I47521a100f8287ecdece25e810db8f3cade46778

Lorenzo Colitti   commited 2022-03-07 12:21:40 +00:00
f79dcecf9b
Remove dead code in BpfNetMaps.
Most of the methods in BpfNetMaps are only used on T+ devices,
where BpfNetMaps never calls into netd. Remove the code in these
methods that calls into netd, because that code can never run.
The code was only written in the first place because it was
necessary when TrafficController had not yet moved to mainline.

The list of methods is:
- addNaughtyApp
- removeNaughtyApp
- addNiceApp
- removeNiceApp
- setChildChain
- replaceUidChain
- setUidRule

Test: treehugger
Change-Id: Ie7d210be2f7983178f5aa550370b9476de66e988

Lorenzo Colitti   authored and   markchien   commited 2022-03-07 12:56:18 +08:00
82244fd16c
Remove ConnectivityManager swapActiveStatsMap API
swapActiveStatsMap is temporary added for the NetworkStatsFactory to
call BpfNetMaps#swapActiveStatsMap in tethering mainline module. Now
NetworkStatsFactory already be mainlined, calling BpfNetMaps#swapActiveStatsMap
directly.

Bug: 218494448
Test: atest ConnectivityCoverageTests
      atest FrameworksNetTests
Change-Id: I3358e4ac5fb7ed0964273afdbccd1b4128ca7645

markchien   commited 2022-03-07 12:25:47 +08:00
49e944cc1c
[CLATJ#32] ClatCoordinator: untag clat raw socket
Untag clat raw socket while stopping clatd.

Bug: 218407445
Test: atest FrameworksNetTests
Test: connect and disconnect to/from IPv6 only network
Check dumpsys tag map and logging for tagging/untagging socket
03-04 16:29:17.247  1330  1714 I jniClatCoordinator: tag uid AID_CLAT to socket fd 420, cookie 16524
03-04 16:29:31.343  1330  1714 I jniClatCoordinator: untag socket cookie 16524

Change-Id: Id5f5bdfc97a15abfa1a49b06dcb3c2c25743c74f

Hungming Chen   commited 2022-03-07 11:38:40 +08:00
1c257cdb8d
[CLATJ#31] ClatCoordinator: tag raw socket to uid AID_CLAT
Tag socket as uid AID_CLAT to avoid duplicated data usage counting by
bpf program.

Test: atest FrameworksNetTests
Test: check dumpsys for tag mapping and check logging for socket cookie

$ adb shell dumpsys connectivity trafficcontroller
  mCookieTagMap:
    cookie=28831 tag=0x0 uid=1029

03-02 22:43:13.201  1719  1921 I jniClatCoordinator: tag uid AID_CLAT to socket fd 609, cookie 28831
03-02 22:43:13.217  5496  5496 I clatd   : tunnel.write_fd6 609, cookie 28831, flags 0x0 (debug only)

Bug: 218407445
Change-Id: I67b9f30b143e791ddf59d5627e068ec3107e3328

Hungming Chen   commited 2022-03-07 11:37:41 +08:00
89d12060e1
Merge "[MS68.4] Address comments at aosp/1958144" am: 481c0cd100
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1973859

Change-Id: Ic7f55abed077e1dbbc2fd11489bc8b701d9a58ad

Frank Li   authored and   Automerger Merge Worker   commited 2022-03-03 02:54:44 +00:00
51b0fdc3b9
Merge "[MS68.4] Address comments at aosp/1958144" am: 481c0cd100
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1973859

Change-Id: I20538f9c3637fe2282b00ce426c14379fb7899ea

Frank Li   authored and   Automerger Merge Worker   commited 2022-03-03 02:53:23 +00:00
a301247810
Merge "[MS68.4] Address comments at aosp/1958144"
Frank Li   authored and   Gerrit Code Review   commited 2022-03-03 02:26:53 +00:00
481c0cd100
Do not enable ingress rate limit until clsact qdisc exists am: f1fe8ee928 am: fb37f36123
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2003978

Change-Id: Ib151c659bffbe5ca6bc5e44bbc052a8f540f87aa

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-03-02 21:00:02 +00:00
83c7677bf7
Do not enable ingress rate limit until clsact qdisc exists am: f1fe8ee928
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2003978

Change-Id: Ib8b015c00036fe88ca6beae5083fa5363749c918

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-03-02 20:15:59 +00:00
fb37f36123
Do not enable ingress rate limit until clsact qdisc exists am: f1fe8ee928
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2003978

Change-Id: I81ef8189ca04738b16a584e079e73ffa92e31a9f

Patrick Rohr   authored and   Automerger Merge Worker   commited 2022-03-02 20:15:09 +00:00
2d3a6696ba
Do not enable ingress rate limit until clsact qdisc exists
The tc police filter attaches to the clsact qdisc, so the rate limit
cannot be enabled before the qdisc is added to the interface.
The clsact qdisc is added as part of INetd#networkAddInterface, which is
called from inside updateLinkProperties.

Test: atest FrameworksNetTests:ConnectivityServiceTest
Change-Id: I0713605ff3684f8271eb3f0e29ab7116561963f1

Patrick Rohr   commited 2022-03-02 20:41:13 +01:00
f1fe8ee928