Include verifyHostname in the test instead of calling the hidden API.
This removes a bit of coverage as verifyHostname itself is not tested
anymore, but it still verifies behavior of the verification and state of
the SSL session on socket creation.
verifyHostname is @hide API so it should not be exercised directly by
CTS.
Bug: 410435307
Flag: TEST_ONLY
Test: atest
Change-Id: I11f56e21ba242b7fcc5b84f6de992dc94d90ddee
Remi NGUYEN VANauthored and Junyu Laicommited 2025-05-07 17:21:26 +08:00
Currently, isSatelliteDataOptimizedApp utilizes the PackageManager
from the primary user's context. However, if the added package is
not visible to the primary user, the satellite controller will
fail to parse the required information from the AndroidManifest.
Therefore, the corresponding PackageManager should be used when
a package is being checked.
Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
--update-device
Test: Manual:
1. Create and setup 2nd user.
2. adb install --user 10 CtsHostsideSatelliteDataOptimizedWithMetaData.apk
3. adb shell dumpsys connectivity
4. adb uninstall com.android.cts.net.hostside.satellitedataoptin.testapp
Bug: 410731080
Change-Id: I7adadb3449ec2ff984e6672ffb97919a2418e9b7
The IA_PD Option is modeled as a separate "packet", because it can
contain various options itself. It turns out that with the current
packet builder architecture, building nested packets (of which DHCPv6 is
an extreme example) is actually quite difficult. We would encounter
similar problems if we ever were to try and build netlink packets.
One thing that could be done is to add another overload for
PacketBuilder#div that takes another PacketBuilder object, allowing an
syntax such as:
dhcp6_header / dhcp6_rt_sol_max / (dhcp6_ia_pd / dhcp6_ia_prefix)
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I35694627285759dd17d8a8bf5994aaa96e6b391d
This adds support for building the Dhcp6Pkt header. Options are added
later.
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I588d8fc6ba68d1132a3beb1b436d8175ac0ae577
This adds the basic structure for a full end-to-end test for DHCPv6-PD
using a tap interface. This tests the interaction between the DHCPv6-PD
client, IpClient, and Netlink callbacks, and the kernel.
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I6e56703187310ceaf6462b41f2e1ab3690faff01
Note that a new neighbor can still be added while processing a packet,
which may influence the result, though this shouldn't affect tests.
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: If6860f3a52a406bbbbdd323061bfb918f1fb866c
This commit makes the NsdManager.registerService() API public. This
change will enable developers to implement more customizable mDNS
advertising behavior in their applications.
Bug: 373270045
Test: atest CtsNetTestCases:NsdManagerTest
Flag: com.android.net.flags.mdns_advertising_improvement
API-Coverage-Bug: 415202964
Change-Id: I32359f7265b3597defd57123ecff0deaef0011f8
Currently, the SatelliteAccessController checks if apps are
opt-in via a property tag under the application. This is
incorrect because PROPERTY_SATELLITE_DATA_OPTIMIZED is an
existing, released meta-data usage for Android B and needs
to be preserved.
Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
--update-device
Bug: 410731080
Change-Id: If09890faf5d208d007179ecc29b7cf16f6fe6ebb
This is a no-op refactoring that ensures events are handled
on the handler thread. While this is already the case in
production code, it's not consistently true in the tests.
This change adds the necessary methods for faking events
on the handler thread while maintaining readability in the
tests.
Flag: EXEMPT refactor
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
--update-device
Bug: 410731080
Change-Id: I816233a823314c4c276138438bbaf33f781eccfe
For use in tests. This CL won't build by itself
mv NetworkStack/src/android/net/dhcp6/Dhcp6*Packet.java \
Connectivity/staticlibs/device/com/android/net/module/util/dhcp6
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Ie072f2f20ecfbf23f77606dd064e0f6fbd7c2232
IPv4 addresses will be converted as v4-mapped-v6 address while
writting it to byte form. v4-mapped-v6 addresses in byte form will be
parsed to Inet4Address while converting it back.
Bug: 392509494
Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.StructTest
Flag: EXEMPT refactor
Change-Id: Ia906d2cae7bb7402ff937da267c2552431b2d0f7
This is needed because user/package changed events occur rarely
and might not be included in bugreports when satellite network
problems occur.
This change also prints the feature flag in the dumpsys and
removing some logs which are redundant and not useful.
Sample output:
SatelliteAccessController:
SupportConstrainedDataSatelliteOptIn: true
Role-Sms Uids: {0={10138}}
Opt-In Uids: {}
Log:
2025-04-29T15:22:50.816963 - SmsRoleUids: {10138} Opt-InUids:{}
2025-04-29T15:22:49.164469 - SmsRoleUids: {10138} Opt-InUids:{10260}
2025-04-29T15:22:24.392085 - SmsRoleUids: {10138} Opt-InUids:{}
Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
--update-device
Bug: 410731080
Change-Id: Ic80aff756a0552e7d0e26fb906460c31e67a960e
Currently, onUserAdded calls onRoleSmsChanged, which triggers a
fallback UIDs callback. Updating opt-in UIDs also triggers a
callback. The callback triggered by onRoleSmsChanged actually
not necessary and should be removed.
Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
--update-device
Bug: 410731080
Change-Id: Ifc6aa8d6b798cca2bfc575f986a012c52ea75667
The NsdManager.registerService() method was originally scheduled to
become a public API in the 25Q2 release. However, this transition did
not occur as planned. The current target for making this method a public
API is the 25Q4 release. In the interim, the @UnsupportedAppUsage
annotation is being added. This is necessary to support an internal
MediaShell use case for the 25Q2 TV release. This change marks the API
as available in the dex so callers can call without being blocked by
hidden API restrictions. This API will be marked as public API
immediately after this change for 25Q4.
Test: TH
Flag: EXEMPT no logic change
Change-Id: I8e6e33ca224f459c3d8344c05ea6d6e5a4556a8d
This is a no-op refactoring, which renames several methods and
variables to more accurately reflect their functionality and
follow the naming style.
Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
--update-device
Bug: 410731080
Change-Id: I84b9eca60f2b8543b8bdb7cf972103b79105e670
Terrible errors in Tethering.java aren't used to log actual errors, but
just to provide metrics on how often these expected codepaths occur. To
avoid spamming the android error logs or crashing eng devices, change
these to use info logs instead.
Flag: EXEMPT logging change only
Bug: 410470516
Test: atest TetheringTest
Change-Id: I4ec202231e79c32f727a7620a6cab08e850d1629
Quang Anh Luongcommited 2025-04-30 12:16:30 +09:00
For maintaining constrained data satellite opt-in apps, this is
needed for tracking apps installed on the storage.
Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
--update-device
Bug: 410731080
Change-Id: I2a686a5a37747de97dcee6b78f66965cb4fd9942