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
This is a no-op change. Use Dependencies to mock static methods
instead of using spy().
Bug: 282861165
Test: atest TetheringTests
Change-Id: Ia8726375a8da17dab745848b046f4c32b84d5d77
- This CL puts RoutingCoordinator into staticlibs to make it usable by
both Tethering and ConnectivityService on R.
- This CL also changes the return type of
ConnectivityInternalApi#getRoutingCoordinatorManager() to IBinder so
it has fewer dependencies.
Bug: 350699020
Test: CI
Change-Id: Iba096e940795cd33e61c5141721394ad39e5ce6d
This CL introduces net-utils-framework-connectivity, net-utils-tethering
and net-utils-service-connectivity as staticlibs.
- net-utils-framework-connectivity will be used by
framework-connectivity-pre-jarjar.
- net-utils-service-connectivity and net-utils-tethering are the
static liraries used by service-connectivity-pre-jarjar and Tethering
respectively.
Bug: 350699020
Test: CI
Change-Id: I4dbb2b0de905a576cfcf24d2d5d1f1a261d2bd68
This is a no-op change. Add a new TetheringMetrics constructor
for the subsequent TetheringMetrics TX/RX calculation feature.
Bug: 282861165
Test: atest TetheringTests
Change-Id: I9d368d8ad527d73cc91e02ee72a5731fb4c6c195
This reverts commit d6fa127ec0.
Reason for revert: updating lint-baseline.xml does not cause build brekage; keep holding back the separate CL that turns FlaggedApi violations into errors
Change-Id: Ie5d048bde1c0b717cb0d589d33550e6b68154be8
Mårten Kongstadauthored and Gerrit Code Reviewcommited 2024-07-04 06:31:15 +00:00
Revert submission 3156916-flagged-api-lint-baseline
Reason for revert: Droidmonitor created revert due to build breakages in b/350976857.
Reverted changes: /q/submissionid:3156916-flagged-api-lint-baseline
Change-Id: I52ca486a00d47f478c61ce0ae39b9d9b584af87e
Priyanka Advaniauthored and Gerrit Code Reviewcommited 2024-07-03 19:53:58 +00:00
These were originally split in two, so low-level BPF could be changed
more easily. With the introduction of MCTS, updatability of CTS tests is
not a concern anymore, so these tests can be merged back together.
Test: atest TetheringIntegrationTests
Change-Id: Ia0bd91470d445e90230f7a9546de1cb56deef9cc
This change moves the null check into the service implementation. Since
exceptions on oneway binder interfaces are ignored (across process), the
code was changed to just return early instead.
This also adds a couple of Objects.requireNonNull() assertions in
TetheringManager to assert the existing @NonNull annotation.
Test: TH
Bug: 337167681
Change-Id: I5301ed084bb26c2f910041e9b25314f8181718d1
The Lint FlaggedApi checks are currently configured as warnings. Add
existing violations to baselines files to prepare for turning the
FlaggedApi checks into errors.
Bug: 303434307
Test: treehugger
Flag: EXEMPT not possible to flag baseline changes
Merged-In: I5cbff0293af79e68057fd42ecfa8d2c8af31ae6a
Change-Id: I5cbff0293af79e68057fd42ecfa8d2c8af31ae6a
These tests are run as part of the MTS suite, setting min_sdk_version
ensures that these tests can be installed on an older device and test
the corresponding mainline module.
Test: atest [<mod_name>...]
Bug: 156476221
Change-Id: Ic94b00ee1818063fc9f13e4ecffaca88f58c30c3
Replace TetheringRequestParcel with TetheringRequest in the service
code. This makes future changes easier since TetheringRequest is a
proper class and not an AIDL object.
Bug: 216524590
Test: atest TetheringTest TetheringManagerTest
Change-Id: I0cdee597d393e53feb9fe9aff4d6c67330c88599
Quang Anh Luongcommited 2024-06-26 16:25:13 +09:00
* changes:
Clean up BpfCoordinatorTest after refactors
Move upstream interface BPF support check to BpfCoordinator
Refactor BPF map update logic of upstream interface change
Centralize IP neighbor monitoring in BpfCoordinator
Get rid of BpfCoordinator#mPollingStarted
KH Shiauthored and Gerrit Code Reviewcommited 2024-06-22 12:34:34 +00:00
* changes:
Add some documentation to EthernetInterfaceStateMachine
Add support for link state tracking
Add unit test class for EthernetInterfaceStateMachine
Add missing call to add states to state machine
Make class testable
Log.wtf if block times out
Wait on IpClient#onQuit in StartedState#exit
Use TAG instead
Introduce CMD_ON_NETWORK_NEEDED and CMD_ON_NETWORK_UNNEEDED messages
Clean up and document state lifecycle
Add convenience method for processMessage with no arguments
Implement NetworkOffer in EthernetInterfaceStateMachine
Add boilerplate to represent interface states in state machine
Fix typo in SyncStateMachineTest
Move SyncStateMachine to staticlibs
Treehugger Robotauthored and Gerrit Code Reviewcommited 2024-06-21 19:01:38 +00:00
This reverts commit 083cce9bf9.
This is targetting mainline release M-2024-09.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I25f4ac83db0700185391897f45a5cd9fb64e7929
Maciej Żenczykowskicommited 2024-06-21 15:14:43 +00:00
Removed the use of a real IpServer instance in BpfCoordinatorTest,
as it is no longer needed after the refactors in aosp/2716773 and
aosp/3113123.
Test: atest TetheringTests
Bug: 294025403
Change-Id: I4760669372275a0165f4980705e328c80e0649a5
Removed upstream interface BPF support check from IpServer and moved
it to BpfCoordinator. The support check can be performed directly in
BpfCoordinator using the interface name.
Test: atest TetheringTests
Bug: 294025403
Change-Id: Ia51bc3ab18dd21afdca9db9199fa060aab68f768
The Lint FlaggedApi checks are currently configured as warnings. Add
existing violations to baselines files to prepare for turning the
FlaggedApi checks into errors.
Bug: 303434307
Test: treehugger
Flag: EXEMPT not possible to flag baseline changes
Merged-In: I990ce57cd5cdac44ee8b93565b45aa15790ad697
Change-Id: I990ce57cd5cdac44ee8b93565b45aa15790ad697
200ms does not seem to be enough for our test infra. There have been test failures where tethering test was started on devices with physical interfaces that were available for tethering (i.e. cuttlefish on Android R and S).
This change increases the timeout to 1000ms, which unfortunately means the tests will take a bit longer.
Test: TH
Bug: 348044867
Change-Id: I5fe541cf1db1097040066baa73ba949533718ef6
This CL centralizes IP neighbor monitoring in the BpfCoordinator,
eliminating the need for redundant monitors in each IpServer.
Test: atest TetheringTests
Bug: 294025403
Change-Id: Ie6fbc3eeaa0ed4a34a6680714f44678e2d5b633a
Refactor IpServer/BpfCoordinator to remove mPollingStarted, and just
maintain the invariant that "data usage polling and conntrack
monitoring are running iff at least one IpServer is serving".
Test: atest TetheringTests
Bug: 294025403
Change-Id: I55064ee78e1cda12ad76b7c31496d760dcffdd76
because the shared r/w lock on the first
conflicts with the exclusive r/w lock on the second
This fixes roughly *half* the BpfMapTest tests.
Test: TreeHugger, atest BpfMapTest less broken
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9d500597cad16bb7756df3e6feb9a7aa762e59d9
Maciej Żenczykowskicommited 2024-06-15 14:04:03 -07:00
with map & program that can be checked from system_server
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ife736d54cfc3768aca378d46a092c4518a7302dd
Maciej Żenczykowskicommited 2024-06-15 03:58:42 -07:00
(easier to realize what is happening, and clearer with the also
existing netbpfload.35rc)
Test: TreeHugger
Change-Id: I587aa3d8b846800c7fc93765ecb0acc9715b0521
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Maciej Żenczykowskicommited 2024-06-13 15:26:55 -07:00
This CL makes the TetheredInterfaceRequester a class member that gets
initialized (and therefore creates a tethered interface request) in
setup, and releases it again in tearDown. This ensures that when a test
interface is created, ethernet never puts said interface in client mode.
In a previous iteration of this test, there was a race where test
interfaces were briefly put in client mode, which started an IpClient on
the interface. One of the first things the IpClient startup code does is
enable IPv6 which causes RS and MLD packets to be transmitted. This
caused a lot of flaky test failures as the tests were not expecting to
see these packets (and they did not drain the interface appropriately).
Making the tethered interface request permanent during the runtime of
this test solves this issue. As a follow up, the test interfaces should
also be drained when first being passed to TetheringTester.
Test: atest EthernetTetheringTest --iterations 50 (-> there was one
flaky failure that is still being investigated).
Bug: 341800184
Change-Id: Ib0a2518b89d8cc05bb800db6ec5e31f527ba2daa