Commit graph android_packages_modules_Co.../Tethering
Message SHA1
Merge "Make java_sdk_library dependencies explicit" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-09-10 19:12:45 +00:00
430a8ad33c
Merge changes from topic "tether-active-sessions" into main
* changes:
  Support active session metrics sampling
  Add unit test for get max counter when removing tethering client
  Track tethering active sessions counts

Junyu Lai   authored and   Gerrit Code Review   commited 2024-09-10 02:53:47 +00:00
ff3b206df0
Make java_sdk_library dependencies explicit
modules should specify the submodule of java_sdk_library that the module
actually depends on

Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a

Jihoon Kang   commited 2024-09-10 00:01:31 +00:00
8401b6a9f0
Add NetworkStack to framework-connetivity and framework-tethering impl lib visibility
As NetworkStackApi*Shims modules defined in
packages/modules/NetworkStack depends on the impl libs of
framework-connectivity and framework-tethering

Test: m nothing
Bug: 358613520
Change-Id: I5c90d4ae6eeb51f42f1ae1c88dd726bfdcd093e8

Jihoon Kang   commited 2024-09-09 22:55:01 +00:00
e7cae17b3a
Support active session metrics sampling
This commit introduces a feature to monitor and upload active
tethering connection metrics. This will help us understand
the usage of tethering and improve the user experience.

The feature is disabled by default and will be gradually
rolled out.

Test: atest TetheringTests:com.android.networkstack.tethering.BpfCoordinatorTest
Test: manual test with:
      adb shell device_config put tethering tether_active_sessions_metrics 3
      m statsd_testdrive && statsd_testdrive -e 925
Bug: 354619988
Change-Id: I3b3f5ae068b127192c35541c6d9439b7367d54bd

Junyu Lai   commited 2024-09-09 16:35:03 +08:00
d2581d64fb
Add unit test for get max counter when removing tethering client
Test: atest TetheringTests:com.android.networkstack.tethering.BpfCoordinatorTest
Bug: 354619988
Change-Id: I9b4c4c265ca4e66bff353ea616afd0f1ad4339be

Junyu Lai   commited 2024-09-09 16:05:42 +08:00
0ea1136fcb
Track tethering active sessions counts
This commit implements the necessary counters to bookkeep
max connection count, which will be used in follow-up changes
to monitor and upload active tethering session metrics.

The feature is disabled by default and will be gradually
rolled out.

Test: atest TetheringTests:com.android.networkstack.tethering.BpfCoordinatorTest
Bug: 354619988
Change-Id: Iaf251b0ec08bde95c1b12df022db2e03179309de

Junyu Lai   commited 2024-09-09 15:44:50 +08:00
06b81b6af3
Merge "Merge 24Q3 to AOSP main" into main
Xin Li   authored and   Gerrit Code Review   commited 2024-09-07 01:10:53 +00:00
ac4f9ef5ce
Fix typo in EthernetTetheringTestBase
Bug: 361219545
Test: atest EthernetTetheringTest#testTetherClatBpfOffloadUdp
Change-Id: Ib1e48799f37b19390d304822ec55d5ad3615eaa5

KH Shi   commited 2024-09-06 06:33:32 +00:00
77f6a52083
Merge "Fix testTetherClatBpfOffloadUdp test failure" into main am: cca6589298
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3256557

Change-Id: Ie244d71e3e62963e247e3884f9ca9de8fb8ffb28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2024-09-05 15:41:03 +00:00
d59cc4f79d
Merge "Fix testTetherClatBpfOffloadUdp test failure" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-09-05 15:33:29 +00:00
cca6589298
Fix testTetherClatBpfOffloadUdp test failure
In some cases, the test device may already have an existing CLAT
interface, causing the test to fail because it assumes no CLAT
interface exists before running the test. This change fixes the issue
by retrieving the correct test CLAT interface by its name.

Bug: 361219545
Test: atest EthernetTetheringTest#testTetherClatBpfOffloadUdp
Change-Id: Ie2cdd9c9a6fd143c8419636a448297b36f3c1c40

KH Shi   commited 2024-09-05 07:08:16 +00:00
cf7e5cbf93
Merge changes from topic "upstream_data_usage" into main am: e09e029568
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3249972

Change-Id: Iefe6c72fa447aac29b48d9b1ee26eea4a93003de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Paul Hu   authored and   Automerger Merge Worker   commited 2024-09-04 07:35:23 +00:00
0ce0e1c6e7
Merge changes from topic "upstream_data_usage" into main
* changes:
  Process all accesses to TetheringMetrics on the handler thread
  Calculate and populate TX/RX bytes for each upstream in TetheringMetrics
  Initialize upstream data usage after tethering is turned on

Paul Hu   authored and   Gerrit Code Review   commited 2024-09-04 07:30:52 +00:00
e09e029568
Process all accesses to TetheringMetrics on the handler thread
Since calling NetworkStatsManager.queryDetailsForUidTagState may
be blocked for up to 20 seconds, potentially leading to enable
Tethering failure, a handler thread is added to process this task
and prevent blocking.

Furthermore, thread safety is ensured for all accesses to the class
by the internal handler thread.

Bug: 282861165
Test: atest TetheringTests
Change-Id: I38d055e5c3f8dbb22eac97f858d4f56925e8ab36

Paul Hu   commited 2024-09-04 06:08:38 +00:00
26d4476007
Calculate and populate TX/RX bytes for each upstream in TetheringMetrics
Bug: 282861165
Test: statsd_testdrive 303
Test: atest TetheringMetricsTest
Change-Id: I9a358dfc22640f309ca52378ad826cd7dbcee9b3

Paul Hu   commited 2024-09-04 03:00:21 +00:00
ee9f387269
Initialize upstream data usage after tethering is turned on
Added logic to initialize upstream data usage after tethering is
turned on in TetheringMetrics, which is essential for tracking
data usage accurately.

Bug: 282861165
Test: atest TetheringTests
Change-Id: I0b91f6a5966f234ce9d6c67ad0edfe516645d38b

Paul Hu   commited 2024-09-04 02:00:12 +00:00
f982a1dc70
Merge "thread: rename init.34rc to ot-daemon.34rc for clarity" into main am: 2c018db04a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3251272

Change-Id: If0f7dcd2021f0f82dce5509d25b3fbeab47696f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-09-03 20:54:25 +00:00
31ca942f96
Merge "thread: rename init.34rc to ot-daemon.34rc for clarity" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-09-03 20:47:30 +00:00
2c018db04a
Merge "Return false when tetherOffloadRuleAdd doesn't really add items" into main am: c694c351c0
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3252331

Change-Id: Icdef63341b27da81ac477907b60c99f7975d929f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-09-02 08:27:57 +00:00
12f6e5c8e7
Return false when tetherOffloadRuleAdd doesn't really add items
This is needed for the follow-up CLs to check whether an item was
added when calling tetherOffloadRuleAdd. This is safe since no one
is actually checking the return value of this method.

Test: atest TetheringTests
Bug: 354619988
Change-Id: I28bafe3145bd2f62f9a7db9d0a300d2c7a148040

Junyu Lai   commited 2024-09-02 14:32:07 +08:00
7b4e318889
thread: rename init.34rc to ot-daemon.34rc for clarity
(this renames the file in the apex, but should otherwise not matter)

Test: TreeHugger, manually on cf (thread daemon still starts)
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6087f95b0f3a4ba10b922ca78d2210377d5075ea

Maciej Żenczykowski   commited 2024-08-30 18:43:42 +00:00
bd1fd22ffa
Merge "Add SoftApConfiguration to TetheringRequest" into main am: df47152c45
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2946445

Change-Id: I5efbc95e66dbbdcaa31f79d0c0e39447f8387ccb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Quang Luong   authored and   Automerger Merge Worker   commited 2024-08-21 07:37:21 +00:00
de8f05b661
Merge "Add SoftApConfiguration to TetheringRequest" into main
Quang Luong   authored and   Gerrit Code Review   commited 2024-08-21 07:28:56 +00:00
df47152c45
Add SoftApConfiguration to TetheringRequest
Allow apps to specify the SoftApConfiguration to use for Tethering via
TetheringRequest.

API-Coverage-Bug: 361242098

Bug: 216524590
Test: atest TetheringManagerTest
Change-Id: I956a2f9dc989e7b2d404b84957d859035e4cd6e8

Quang Anh Luong   authored and   Quang Luong   commited 2024-08-21 07:28:26 +00:00
a940e426c1
Merge "Add Fragmented Packet Test to testTetherClatBpfOffloadUdp" into main am: cc6c9d3de7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3107700

Change-Id: I4a0f86fc10668bd6fd23ddc86798f29621f27024
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2024-08-20 18:37:59 +00:00
7430de61e2
Merge "Add testTetherClatBpfOffloadUdp to TetheringTest" into main am: 0afcda3caa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2632313

Change-Id: Ie784c8f294350c4e0503d233f6fb1b81fc3ce0b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2024-08-20 18:37:43 +00:00
e6765e85fd
Merge "Add Fragmented Packet Test to testTetherClatBpfOffloadUdp" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-08-20 18:34:57 +00:00
cc6c9d3de7
Merge "Add testTetherClatBpfOffloadUdp to TetheringTest" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-08-20 18:34:36 +00:00
0afcda3caa
Merge "Add txBytes and rxBytes to RecordUpstreamEvent" into main am: a90e703565
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3159373

Change-Id: Iddf7f89350bed3bcbefa48f541a3d0df9a0d9937
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Paul Hu   authored and   Automerger Merge Worker   commited 2024-08-19 15:14:35 +00:00
3173bbd306
Merge "Add txBytes and rxBytes to RecordUpstreamEvent" into main
Paul Hu   authored and   Gerrit Code Review   commited 2024-08-19 14:58:23 +00:00
a90e703565
Add txBytes and rxBytes to RecordUpstreamEvent
This is a no-op change. Add txBytes and rxBytes to
RecordUpstreamEvent to support data usage calculation in
subsequent changes.

Bug: 282861165
Test: atest TetheringTests
Change-Id: Id578ffc79958ec67dd4e7af335bae89e7076e06a

Paul Hu   commited 2024-08-19 08:57:14 +00:00
25326eccd9
Merge changes I6d267dda,I2a9aa02b into main am: a22fdc2214
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3218002

Change-Id: Ib3b2741cf89158fff30dacd3d644687e7ee7770e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Motomu Utsumi   authored and   Automerger Merge Worker   commited 2024-08-16 08:49:38 +00:00
a5d2836ba6
Use java_aconfig_library for android_core_networking flags
Connectivity repo now can use java_aconfig_library since this target is
available on all downstream branches.

This CL removes framework-connectivity-t-mdns-standalone-build-sources.
Files in this target use flags which won't be available in the
out-of-tree build but the next out-of-tree library import will not use
the classes in that filegroup anymore.
So the standalone build rule will still match the out-of-tree build.

Bug: 345121279
Test: TH
Change-Id: I2a9aa02bd0c9aa00d460f98cd51d5dec4098fb89

Motomu Utsumi   commited 2024-08-16 16:57:29 +09:00
2fc115491a
Merge "Add buildNetworkTemplateForUpstreamType() helper method" into main am: 0fd9d77ce9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2600008

Change-Id: Id91e30e66711a153109b3fec02a6e794881f00d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-08-14 07:32:42 +00:00
a11badb528
Merge "Add buildNetworkTemplateForUpstreamType() helper method" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-08-14 07:06:35 +00:00
0fd9d77ce9
Add buildNetworkTemplateForUpstreamType() helper method
The method handles different types of UpstreamType and constructs
the corresponding NetworkTemplate object.

Bug: 282861165
Test: atest TetheringMetricsTest
Change-Id: I1b7091e6da2712df6b6319e545465b409259f743

Wayne Ma   authored and   Paul Hu   commited 2024-08-13 03:57:36 +00:00
96496231c7
Merge "Do not block broadcast on handler processing" into main am: 1882368c5c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3213637

Change-Id: I6a6964e296f26be47e9718d50e116293be0923df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-08-10 03:27:34 +00:00
ebc0574326
Merge "Do not block broadcast on handler processing" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-08-10 03:09:02 +00:00
1882368c5c
Do not block broadcast on handler processing
Instead of blocking the broadcast until onReceive returns on the
handler, only post in onReceive.

This should make no difference for the only user, the
mCarrierConfigChange listener in Tethering.java, as the callback still
runs on the handler.

Bug: 349919195
Test: atest
Change-Id: Ie8ce7afbe905b4c6972b3aabda2d7792c96eda6c

Remi NGUYEN VAN   commited 2024-08-09 10:59:06 +09:00
151be34424
Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Icfd04c86fb2d9ef1be9dd02725106c0667be1f8a

Bill Yi   commited 2024-08-06 15:20:29 -07:00
68802f88ce
Rename net-utils-tethering to net-utils-connectivity-apks.
CaptivePortalLogin module also require the static lib
net-utils-tethering, rename it to net-utils-connectivity-apks for more
usage scope.

Bug: 329361366
Test: TH
Change-Id: Id68255fec9b1586f445bbd7bf290df3403e4ca11

Xiao Ma   commited 2024-08-02 11:20:21 +09:00
6793fd0621
More documentation about TETHERING_VIRTUAL
Bug: 353392669
Test: N/A
Change-Id: Idaff2c67eccfa3000964c185feba9eaf61260c05

Seungjae Yoo   commited 2024-07-16 13:39:49 +09:00
50e486668c
Merge "Add isUsageSupportedForUpstreamType() helper method" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-07-15 10:43:42 +00:00
f4bae99d1d
Add isUsageSupportedForUpstreamType() helper method
This new helper method provides a convenient way to validate and
determine whether tethering metrics' data usage can be collected
for a given upstream type.

Bug: 282861165
Test: atest TetheringMetricsTest
Change-Id: I7527ce56815e1f7e9382be1a54b84c91552e1129

Wayne Ma   authored and   Paul Hu   commited 2024-07-15 09:30:43 +00:00
9651e04bf0
Merge "Let IpServer use RoutingCoordinator in R" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-07-12 04:07:16 +00:00
86219a1244
Let IpServer use RoutingCoordinator in R
On Android R, IpServer uses netd to set up tethering while on S+ it uses
RoutingCoordinator.

This CL lets Tethering own a RoutingCoordinatorService when the SDK
version <= R so IpServer can always use RoutingCoordinator instead of
netd.

Bug: 350699020
Test: CI

Change-Id: I0ed33fb050260c26be87079bed0e189716cd8782

Handa Wang   commited 2024-07-12 02:27:22 +00:00
7e9b330d04
Merge changes Ia8726375,I9d368d8a into main
* changes:
  Use Dependencies to mock static methods
  Add a new TetheringMetrics constructor

Paul Hu   authored and   Gerrit Code Review   commited 2024-07-12 01:14:31 +00:00
7e89d18900
Merge "Add more consistent null checks" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-07-09 21:37:51 +00:00
2a3d34413c
Add Fragmented Packet Test to testTetherClatBpfOffloadUdp
Extend testTetherClatBpfOffloadUdp to support fragmented IPv6 packets.
This verifies that downstream fragmented IPv6 UDP packets are
correctly processed by Clatd's BPF offload.

Bug: 285124667
Test: atest TetheringIntegrationTests
Change-Id: Id9c6cfac6fcedbc3615a5502e36851bff62e4dcc

KH Shi   commited 2024-07-08 09:58:08 +00:00
4add163b0c