Revert submission 3527440
Reason for revert: Droidmonitor created revert due to b/403261952. Will be verifying through ABTD before submission.
Reverted changes: /q/submissionid:3527440
Change-Id: Ife596c639899528778f53fef797749fa88596dd6
Revert submission 3527440
Reason for revert: Droidmonitor created revert due to b/403261952. Will be verifying through ABTD before submission.
Reverted changes: /q/submissionid:3527440
Change-Id: I31ae861d5151c9db7e559ba19db7f07c9545d422
Priyanka Advani (xWF)authored and Gerrit Code Reviewcommited 2025-03-13 10:22:16 -07:00
Introduce Ping4 offload support for improved APFv6 multi-device testing.
Adds a decorator to restrict tests to Android B+ capable client device.
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: I01909c1725ba471726223deef325c3f0a80b5c14
stopTethering with a TetheringRequest should only stop tethering if
there is an existing request (pending or serving) that fuzzy-matches the
input and whose UID matches the caller (unless the caller is Settings,
which is allowed to remove any request).
If there is no existing fuzzy-matched request, return
TETHER_ERROR_UNKNOWN_REQUEST.
Bug: 216524590
Test: atest TetheringTest RequestTrackerTest TetheringManagerTest
Change-Id: Ia8a8eab78fbecd38321fd0d48734855cff16febb
Quang Anh Luongcommited 2025-03-13 12:49:08 +09:00
Legacy behavior will return success results to multiple startTethering
calls of the same type, even though the link layer can only support one
of those requests at a time (other than tethered AP + LOHS).
For B+, clean up this behavior by only allowing the amount of requests
that the link layer can concurrently support. To do this, we'll
introduce the concept of "fuzzy-matching" such that if a new request
fuzzy-matches an existing request (either pending or serving), this
indicates that the link layer cannot support the new request
concurrently, and we'll fail the new request with
TETHER_ERROR_DUPLICATE_REQUEST.
To keep track of serving requests, we'll store the request and it's
IpServer in RequestTracker when we call IpServer.enable(), and we'll
remove it (indexed by IpServer) when
1) Calling IpServer.onStop()
2) Calling IpServer.unwanted()
3) We detect an IpServer transition to AvailableState with error code
Bug: 216524590
Test: atest TetheringTest RequestTrackerTest TetheringManagerTest
Change-Id: I1e193f3595a48f806fb70fd08630a12ce2631a59
Quang Anh Luongcommited 2025-03-13 11:11:17 +09:00
This reverts commit 70ede3260c.
Reason for revert: Likely culprit for b/402365566 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: If72cc264c5e505348309c6c11dbbfd11adeaf31b
Chaitanya Cheemala (xWF)authored and Gerrit Code Reviewcommited 2025-03-11 06:05:49 -07:00
Replace the explicit SDK_INT checks with the helper function
SdkLevel.isAtLeastB().
Bug: 216524590
Test: covered by existing tests
Change-Id: I32ae771d5b157d97dfbe3c37caf62e734eaa250e
Quang Anh Luongcommited 2025-03-11 17:16:56 +09:00
Also make the network agent registry two way to eliminate
reordering possibilities.
Test: ConnectivityCoverageTest, CtsNetTests
Change-Id: I0fd90716b9f5501bdcdc7ee5165321737a0076ae
The test expects validated VPN network callbacks. However, an
unexpected Wi-Fi link bandwidth change during the test introduces
flakiness. To enhance test stability, specify the expected
callbacks to reduce flakiness.
Bug: 401489016
Test: atest CtsHostsideNetworkTests --iteration
Change-Id: I152ba5a4ff6c4a124db820f0eb58bb057e4dee5b
StopTetheringCallback implements no-op default methods, so call these explicitly in the CTS test to satisfy the coverage linter.
Bug: 385014495
Bug: 385278741
Test: build
Change-Id: Ife938fc5acb6635f201cfb0dadccb601e513c929
Quang Anh Luongauthored and Quang Luongcommited 2025-03-04 01:08:57 -08:00
Unreleased SDK version is 10000, not 100000.
The code is already correct, only the comment is wrong.
Test: comment-only change
Change-Id: Ib006e98cbaf10b7da0f7a80df8d6a99527923743
Lorenzo Colitticommited 2025-03-03 20:30:24 -08:00
testBlockIncomingPacketsis flaky since ParcelFileDescriptor's
finalizer closes fd and makes fd invalid.
This CL fixes this issue by keeping the reference to
ParcelFileDescriptor.
Bug: 394503660
Test: testBlockIncomingPackets
Change-Id: I1c1645d95b9d9ae1bd5af4ada500f50f350b6b0b
The tests for Connectivity will run on older versions of the module
unless you put this annotation on the test. In this case this will
happily crash some devices.
Bug: 399659876
Test: TH
Change-Id: I149883c9e461878a228687a96f04f0b4ebf2408a
Now that python 2 is fully removed, there's no need for
version-specific properties. Remove them.
Also remove usages of embedded_launcher: true, as that
is the new default value.
Bug: 399954452
Test: Presubmits
Change-Id: I368416638bbf1f5e76f7756792d537f72f3c9714
I didn't notice repo had failed the last upload with error 500...
This patch addresses the last outstanding comment.
Test: ConnectivityManagerTest
Change-Id: I970613a71e0b1854261e9615ff113a1d404fc1d0
PendingIntent.send will throw CanceledException when the intent
can't be sent, because it was canceled or some other reason. In
some, but not all of these cases, it will still call onSendFinished
after the send is done. This means there is no way to be sure
to do something exactly once after the intent is sent.
Unfortunately, ConnectivityService must keep a wakelock until
sent is finished, and wakelocks must be released exactly once.
Too bad.
The simplest solution is to create a specialized listener object
that can manage the lifecycle of the wakelock. This allows
very localized code, easy review and checking, cheap thread
safety, and not creating multiple locks. It also avoids the
ConnectivityService class implementing OnFinished itself,
which is arguably not very readable considering how big
the class is.
Test: new test that crashes the system without the patch
Fixes: 390043283
Change-Id: Ice528eddaedb4d663098eb2bb0ae7183dafbc073
* changes:
Delete unused createTapInterface method
Delete unused createTapInterface method
Replace createTapInterface() with new Builder API
Replace createTapInterface() call with new Builder API
Maciej Żenczykowskiauthored and Gerrit Code Reviewcommited 2025-02-24 15:26:06 -08:00
This commit removes the obsolete APF_NEW_RA_FILTER_VERSION flag from
ApfIntegrationTest. The LegacyApfFilter has been deprecated, rendering
this flag unnecessary.
Test: TH
Change-Id: Ia7da139a0f0af5f6e59012fb6dac35590133c1a6
* changes:
Fix test comment
Enable header compression when requested
Implement 6lowpan header compression
Add a basic CSTest for L2capNetworkProvider
Release network reservations in tearDown
Start L2capNetworkProvider in CS
Revert "Join HandlerThread if BLE is not supported"
Maciej Żenczykowskiauthored and Gerrit Code Reviewcommited 2025-02-18 21:39:41 -08:00
Starts L2capNetworkProvider in ConnectivityService. Alternatively, this
could be moved to ConnectivityServiceInitializer instead in a follow up.
When L2capNetworkProvider is created, it starts a handler thread, so
makeL2capNetworkProvider must return null in tests as otherwise the
thread leaks.
Test: atest NetworkReservationTest
Change-Id: I35c14815b1a71f0739c1bf63ad466763d611434c
Currently, upstream network validation is always required, even
for type None. This is unnecessary for APF and mDNS tests, as
they can be executed on local networks. Additionally, some
devices lack the ability to perform network validation when the
hotspot is enabled due to hardware limitations. Therefore, remove
the validation check for upstream type None.
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest
Bug: 335368434
Bug: 396551848
Change-Id: If2a96cf9d62e37fc27be6193f9ce9b9cfc8613df
Junyu Laiauthored and Paul Hucommited 2025-02-17 21:22:19 -08:00
This change is in theory a no-op:
- all 25Q2+ kernels should be 64-bit
- all 5.10+ kernels should be 5.10.210+ or 5.15.149+.
(this only leaves 5.4.x kernels)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0bedff990239c6cbf42a594aa0bb50f1ca89b3e8
Maciej Żenczykowskicommited 2025-02-17 10:31:26 -08:00
This commit updates the testPrefilledMemorySlotsV4() test to include an
edge case where an invalid program length is passed to apf_run() due to
a firmware program update.
Bug: 395545572
Test: TH
Change-Id: I678615139ab6b115cd851ffa8336459988c50ef6
This test fails because Wear devices dont
support WIFI direct
Bug: 369252118
Test: atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest#test_mdns_via_wifip2p -- --abi arm64-v7a
Change-Id: I6f033d8d5eed1b4de0a5924d1e61b611f18d3a8a
Ankit Vermaauthored and Ankit Verma (xWF)commited 2025-02-13 01:04:33 -08:00