* changes:
Support active session metrics sampling
Add unit test for get max counter when removing tethering client
Track tethering active sessions counts
Junyu Laiauthored and Gerrit Code Reviewcommited 2024-09-10 02:53:47 +00:00
modules should specify the submodule of java_sdk_library that the module
actually depends on
Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a
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
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
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
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
* 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 Huauthored and Gerrit Code Reviewcommited 2024-09-04 07:30:52 +00:00
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
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
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
(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 Żenczykowskicommited 2024-08-30 18:43:42 +00:00
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 Luongauthored and Quang Luongcommited 2024-08-21 07:28:26 +00:00
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
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
The method handles different types of UpstreamType and constructs
the corresponding NetworkTemplate object.
Bug: 282861165
Test: atest TetheringMetricsTest
Change-Id: I1b7091e6da2712df6b6319e545465b409259f743
Wayne Maauthored and Paul Hucommited 2024-08-13 03:57:36 +00:00
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
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
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 Maauthored and Paul Hucommited 2024-07-15 09:30:43 +00:00
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
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