Fix current leaks in ConnectivityServiceIntegrationTest, which leaked
the ConnectivityService and CarrierPrivilegeAuthenticator handler
threads, and enable the checks.
Using @DevSdkIgnoreRunner.MonitorThreadLeak ensures that tests properly
cleanup threads (in particular handler threads), as many leaked threads
could affect other tests.
Bug: 310659032
Test: atest --rerun-until-failure 20
Change-Id: Ia62d33d86217fef1d03532bb51c890a90430a70e
ConnectivityServiceTest creates hundreds of NetworkAgentWrapper, without
stopping their HandlerThread. This leaks a lot of threads while tests
are running.
Ensure the threads are stopped in ConnectivityServiceTest, and
integration tests that also use NetworkAgentWrapper.
Test: atest, watch adb shell ps -T [test package pid]
Bug: 310659032
Change-Id: I34f367b2efe3d05e1db5eab4c9fd93ee79c1b683
This is the servide-side impl of the subtypes advertising added in
aosp/2608627. See that CL for more backgrounds.
Bug: 265095929
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: I3d6f96822ac89d12fe29c00f688d848297c25787
This causes the module to crash on rollback because the current
production code does not consider LOCAL_NETWORK to be a valid
capability.
Change-Id: Idf57d72c384b41b483098c4c302738072ebf7f90
Test: TH
Fix: 313030307
Lorenzo Colittiauthored and Remi NGUYEN VANcommited 2023-12-13 11:24:25 +09:00
The verification happened earlier than the interaction with
production code. This may happen in low performance devices,
e.g. cuttlefish. Add timeout for the verification to deflake
the test.
Bug: 313828402
Test: atest FrameworksNetTests
Change-Id: I1ffa7e7573d503eb0396aa211a90ba032175b3a1
BYPASS_INCLUSIVE_LANGUAGE_REASON=Using public API
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSBpfNetMapsTest
(on U and V devices respectively)
Bug: 297836825
Fix: 314858283
Change-Id: Ibeac8cd3a33468c6539234255328affc6b3f8ffe
This is a test only change, replacing the MdnsPointerRecord
constructor usage for queries with the new version.
Bug: 312657709
Test: atest FrameworksNetTests
Change-Id: Ie9e51df78bfc27090503b861c5ac979201f10608
The current implementation of MdnsAdvertiser doesn't support updating an
existing registration. For an update request, the client needs to
unregister it first, which will trigger an exit message and then
register again, which will trigger an announcement message. There are
some clients that don't want to trigger the exit and announcement
message every time. This CL adds the API to support that use case.
Bug: 309372239
Test: TH
Change-Id: Iabe69a987a11104090082e01969e7595f05504e8
Check if the bpf loader rc file is differs from the template files when
ConnectivityService starts. Use Log.wtf() to log the file if there is a
diff.
Bug: 312638861
Test: TH
Change-Id: I0b9ed9962ad0954a051a17b01357d04a0e655ff4
Update registerOffloadEngine() permission check to check the
DEVICE_POWER permission in U. This change is required to allow the
android TV device to access the API in U because the
REGISTER_NSD_OFFLOAD_ENGINE permission can not be backported.
Bug: 313546516
Test: TH
Change-Id: I84b80d102a34487ad54719a86eb525b319e2fd8b
In PrivateDnsConfig class, `useTls` is replaced with `mode`.
This CL a corresponding change.
Bug: 240259333
Test: atest ConnectivityCoverageTests
Change-Id: I60c53e52f287fc7fa05543603a62632d934bb2e6
Vpn.Dependencies contains methods used for legacy VPNs that are
now unused. Remove them.
Bug: 161776767
Test: atest FrameworksNetTests
Change-Id: I68bbb3e519f5558f9006f680df79ae8073e196cd
On mobile networks it is more likely that the user needs to top up or
get a mobile data subscription, rather than "sign in" as the previous
messaging was suggesting.
Following feedback from interaction designers / UX writers, change the
strings to be more appropriate for the most common use-case.
Bug: 153673376
Test: atest FrameworksNetTests
manual test on mobile network force-detecting a portal.
Change-Id: I5b4d4a17fd507d8cf3c9863cf23b5fedb258852e
The NsdManager constructor creates a new thread, which is not
intended to be closed. However, the test in NsdMangerTest and
NsdServiceTest create a new NsdManager instance, resulting in a
large number of threads running during the tests. This can lead
to an out-of-memory error for the tests. To resolve this issue,
use the common singleton thread ConnectivityThread to handle
tasks from the various instances.
Fix: 308544734
Test: atest ConnectivityCoverageTests --test-filter Nsd*
Change-Id: I1908a2bb1bd20da8e0498353bca26f7e89e16626
* changes:
Rename hasCarrierPrivilege... to isCarrierServiceUid...
Detect discrepancies in subIds
Allow carrier service UIDs to access their own WiFi networks.
Jean Chalardauthored and Gerrit Code Reviewcommited 2023-11-20 06:55:04 +00:00
This method tests whether the UID is the carrier service
UID, not whether the UID has carrier privilege.
Note that in normal operation, the carrier service UID always
has carrier privilege.
Test: NetworkAgentTest
Change-Id: I30f8814cc0419a2d6bdbe75fdc82156516eba026
This tests that the network providers are subject to appropriate
limitations as to what they can set as allowedUids – both in the
positive (can do) case, and the negative (can't do) case.
Test: this
Change-Id: I115e2a4bc02ddcd03ecf2f35130fcb0378da22bd
This reverts commit 30fb9b1ca4.
Reason for revert: Potential culprit for CtsLibcoreTestCases test failures b/311612650
Change-Id: Ie7de97159f92a174476a8fa8ea83e3e01914aea1
Michał Brzezińskiauthored and Gerrit Code Reviewcommited 2023-11-17 11:18:56 +00:00
As a specialized network, a network with PRIORITIZE_* is not
generally a good default network, and might cause unexpected
charges if allowed to become one.
Test: CSDefaultNetworkTests
Change-Id: I8f7184f80bb987da720bd067862bd7a546a38e26