This CL updates CSTest to use mocked appOpsManager to bypass
checkPackage enforcement so that test can file network request as
SYSTEM_UID
Bug: 314627716
Test: atest ConnectivitySampleMetricsTest
Change-Id: I0a5f3b1bf2c343644e6f5e2a4ec1b0460e2645c4
This change includes:
1. Use service handler looper when initializing the observers
to simplify the structure.
2. Make the handler variable final in the observers class.
3. Remove misleading comments, where the callback events
are actually dispatched on the oneway binder thread,
which does not block handler thread.
4. Update tests accordingly.
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest
Test: atest FrameworksNetIntegrationTests:com.android.server.net.integrationtests.NetworkStatsIntegrationTest
Test: atest CtsNetTestCases:NetworkStatsManagerTest
Bug: N/A
Change-Id: I5be92853b5bbc795a36bf774956bdac33d79099b
This reverts commit 41557553f6.
(this is no longer needed, as it rolled out with January module,
while the May module this is targetting already includes an rc,
thus eliminating the need for this warning)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I90c8abad2f70d65d142f55c18ad2f34018da6615
Maciej Żenczykowskicommited 2024-03-05 19:49:20 -08:00
Summary of major changes in this CL:
1. update javadoc in AdvertisingRequest to start with one line
2. update ttl API document to ve clearer that values smaller than 1
second is discarded
3. Remove redundant constructors of MdnsServiceInfo
4. add tests for MdnsRecordRepository to verify that addService works
with non-null TTL
Other comments needs more consideration and relatively larger change, so
tracked in separated child issue of b/327619631
Bug: 327619631
Change-Id: I040b8451337d88d96da7120455c228cef204f768
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