These VPN related tests are considered as non-connectivity-module
tests as the corresponding sources are inside the platform
code instead of module. From architecture point of view, these
test would be better to place together with their sources in the
same git so that the tests do not need to restrictions(e.g. SDK
check) to fit into the module tests.
Test: atest FrameworksNetTests FrameworksVpnTests
Change-Id: I10e00c2b52262f23aa8ca38e545196bf93612e51
These unit tests are closely tied to the source code in
frameworks/base and were incorrectly placed in the connectivity
module. Also update the libraries visibility that are used by
the tests.
Test: atest FrameworksNetTests
Change-Id: I196c33a8bd5b5cdb9d42aea381e900681ff6d25e
This is the service-side implementation of the custom service TTL
support added in aosp/2606573.
Bug: 284903641
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: I35246dae37b9fd1710b99cdda10068928e418457
testSampleConnectivityState was flaky since sometimes networks were
disconnected before ConnectivityService#sampleConnectivityState
generates metrics
This CL fixes this issue by adding setKeepConnectedReason to prevent
networks are disconnected
Bug: 318546530
Test: TH
Change-Id: I824f5cd379c8144b48341cc0fd18eb976a4b1cde
- onRoleHoldersChanged & onRoleSmsChanged handling for multiple Users
- Different satelliteNetworkFallbackUids cache for each user.
- Merging uid of each user cache and sending for Multi Layer request
- check SATELLITE_COMMUNICATION permission based package manager
context at different UserHandle
Bug: 324347502
Test: atest FrameworksNetTests
Change-Id: If98524ec7846909d70db3e962e2a11c912768551
The hasNetworkStackPermission() method does not enfore the
permission check. It should be replaced with
enforceNetworkStackPermission().
Bug: 325984919
Test: atest FrameworksNetTests
Change-Id: I9ad0b47190dbc9afd2ee6f5dfc21a4935036733a
This is used in follow-up changes to rate-limit TrafficStats
get* API calls.
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.TrafficStatsRateLimitCacheTest
Bug: N/A
Change-Id: I91bc71dda3a1b7c0b5525278b3c04d12492972fa
When multiple listeners are registered for a resolve query, they were
duplicated in servicesToResolve, so the A/AAAA/PTR/SRV queries would
appear multiple times in the question section of query packets.
Ensure that makeResponsesForResolve does not generate duplicate
responses for duplicate listeners to avoid the duplicate queries.
Bug: 288174267
Fixes: 285090822
Test: atest
Change-Id: Ie6f76de6bfc5018c4c479505f99fbe6d81b64434
Remi NGUYEN VANauthored and Paul Hucommited 2024-02-21 03:41:05 +00:00
Always store the corresponding SubscriptionId together with the Carrier
uid so that when the carrier loses the Privilege, both the uid and
SubscriptionID will be used in the onCarrierPrivilegesLost callback
Bug: 324357121
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.CarrierPrivilegeAuthenticatorTest
atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I28e51c583261a67d4441c6f825ade6781b862ee4
Raise the max listener per client limit from 10 to 200.
A frequent use-case for NsdManager is to file a DiscoveryListener,
and try to resolve/listen for every service using a ServiceInfoCallback.
The current limit of 10 callbacks is easy to hit in that case, since it
would happen if there are at least 10 devices on the network.
Raise the limit to 200 to avoid such problems. In practice it is very
unlikely that there would be more than 200 services on a network; if
advertised by different devices, they would barely fit in a /24 IPv4
prefix, so a limit of 200 should generally be high enough.
Note that for discovery 200 listeners does not mean that batches of 200
queries will be sent: listeners on the same service type are grouped
together so only one query is sent for the type, and results are
distributed to matching listeners.
Note also that the limit is currently only checked when registering
discovery or advertising requests. This should be also checked when
registering other kinds of listeners in a future change.
Bug: 324377460
Test: atest
Change-Id: I86fc00777e9dea3e5192b575581ba562e7401e42
Starting thread from constructor could cause thread leak when assumption
fails and teardown is not called.
This CL moves initialization that starts thread to the setup.
Test: TH
Bug: 322659435
Change-Id: I8e84c12600a98d8019b7759103032c7d668cecd1
- Implement handleSetSatelliteNetworkPreference() at ConnectivityService
to create multi layer request with preference order
PREFERENCE_ORDER_SATELLITE_FALLBACK.
- unit test coverage
Bug: 320514105
Test: m and atest FrameworksNetTests
Change-Id: I3f71104f8c3c998599eaab71ae4076985f4bed77
- create SatelliteAccessController class to identify role sms and
satellite communication enabled uid's, to keep track of role changes
through OnRoleHoldersChangedListener and to request to create
multi layer request to ConnectivityService.
- unit test coverage
Bug: 320514105
Test: m and atest FrameworksNetTests
Change-Id: I95086f7a4fd6fe1261f432e605d792204ff5310b
This CL allows the Carrier Config app to request restricted WiFi nework
by setting the correspoding subscription ID in the network request.
Bug: 315835605
Test: atest android.net.cts.NetworkRequestTest
atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.CarrierPrivilegeAuthenticatorTest
atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I237e692d092ff5f969ce4b7962f6d58099a6f3a9