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
When adding a service, the MdnsRecordRepository finds the
existing service solely by service name, which is wrong. it should check
both the service name and the service type.
Bug: 325862182
Change-Id: I72c6837d0dfb41fc9b2d7763e18b3f5415f8c0d9
follow up to http://aosp/2965923 to hopefully eliminate
that class of bug in the future...
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie09db001ff15a6b2b15bb1bb0c1ce8228e162337
Maciej Żenczykowskicommited 2024-02-16 18:20:55 +00:00
The enum is already using 12 bits, so using fewer bits loses information.
This is in sync with the UidOwnerValue struct used to contain this data.
Test: atest resolv_integration_test
Test: atest resolv_unit_test
Bug: 325150155
Change-Id: Ide0ccea9614cda803b3700a0cc22977e9608209e
Make TetheringRequest parcelable so we can pass it via Wifi APIs and map
Soft AP state changes to the correct request.
Bug: 216524590
Test: build
Change-Id: I63a45b14e9abc288b353159dfdcbe96fde485cb7
Quang Anh Luongcommited 2024-02-15 10:15:05 +09:00
CtsNetTestCasesLatestSdk was originally used for MTS to prevent
installation issues with CUR_DEVELOPMENT target SDK modules (as is the
case for CtsNetTestCases) not installing on released devices.
However setting the min_sdk to a given value should be enough for that
purpose. While there may have been other blockers requiring separation
of CtsNetTestCases and CtsNetTestCasesLatestSdk at the time (in the Q/R
timeframe), more recent modules like CtsAdServicesDeviceTestCases seem
to be using CUR_DEVELOPMENT target SDK in MTS just fine.
Not specifying a target SDK means that the branch default will be used,
depending on the release configuration. So for example trunk_staging
would typically be CUR_DEVELOPMENT=10000, and "next" may use the SDK
version of that release.
This makes sense as a test suite targeting CUR_DEVELOPMENT is necessary
to verify a development build, while a production "next" configuration
should generally use the latest released SDK. But in any case, for
CtsNetTestCases purposes, this would cause the exercised connectivity
APIs to use their latest non-compatibility behavior, which is what
tests expect.
Considering this, add CtsNetTestCases to MTS, so that
CtsNetTestCasesLatestSdk can be removed. This will allow having one test
suite for both CTS and MTS, which in turns allows marking
CtsNetTestCases as MCTS, so that the version of the test to run is
autodetected based on installed modules.
Note this change also removes the unnecessary "platform_api" statement
and comment as this is already handled in
framework-connectivity-test-defaults.
Bug: 317913702
Test: m, aapt dump badging, verify (min)sdkVersion=30, targetSdk=10000
Change-Id: I2267e5c9219f059872928cc681547c3bd5fbc394
Apps will now lose network access once they are in top-sleeping or
higher process state. Adding some cts tests to ensure correct behavior.
The tests are using temporarily using junit Assume to skip if the
feature flag is enabled to enable a following code migration.
Test: atest CtsHostsideNetworkTests
BYPASS_INCLUSIVE_LANGUAGE_REASON=Existing method
Bug: 304347838
Change-Id: Iba7c7bd01309fa7a301fdc1524033f0fad5ae512
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
These can be used by manual or automated tests.
Test: Manual by using the `cmd connectivity` shell commands
Test: atest CtsNetTestCases:ConnectivityManagerTest
Test: atest netd_integration_test
Bug: 322562125
Change-Id: I1de55e430141f566e510b37554a9416c4444213b
This class is in the Tethering module, so any time we update it,
the tests are likely to fail unless Tethering is installed.
Fix: 324367069
Test: TH (test-only change)
Change-Id: I3d906e261939ff70225deeddff91cc6a83efe264
Lorenzo Colitticommited 2024-02-09 08:36:57 +00:00
Allow all printable ASCII characters in subtypes, instead of only the
set of characters allowed in service types.
This is still more restrictive than what the spec allows, but allowing
random bytes would be harder to manage (especially when displaying the
subtypes in logs for example) and there is no known use-case for it.
Having the NsdManager API impose more restrictions is probably also best
for apps to minimize interoperability problems.
Bug: 324377460
Test: atest
Change-Id: Id75879a1c3ea6af8d7995b0e8e0dcc06e7160a0a
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