android_packages_modules_Co.../tests/common/java/android/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jimi Chen 92e23acebb Introduce carrier-aware avoid bad Wi-Fi APIs
This commit introduces new system APIs to manage "avoid bad Wi-Fi" settings,
leveraging both global system settings and carrier configurations. This
enhancement allows for more granular control and visibility into how Wi-Fi
networks are managed, especially in multi-SIM environments.

The new `setNetworkAvoidBadWifi(Context, int subId)` method provides
the ability to programmatically control this setting based on carrier-specific
policies or user preferences. This complements `getNetworkAvoidBadWifi(Context, int subId)`,
which allows querying the setting for a specific subscription ID, ensuring the
system can accurately determine the avoid bad Wi-Fi status.

Additionally, `shouldShowAvoidBadWifiToggle(Context, int subId)` is introduced.
This method determines whether the 'Avoid Bad Wi-Fi' user interface toggle
should be displayed. It considers both global settings and carrier configurations,
allowing for dynamic UI adjustments based on carrier requirements or user preferences.

These changes provide greater flexibility for managing Wi-Fi network selection
and improve the user experience by offering more context-aware control over
cellular behavior.

Deprecated APIs:
- `setNetworkAvoidBadWifi(Context, int value)`
- `getNetworkAvoidBadWifi(Context)`
New APIs:
- `setNetworkAvoidBadWifi(Context, int subId, int value)`
- `getNetworkAvoidBadWifi(Context, int subId)`
- `shouldShowAvoidBadWifiToggle(Context, int subId)`

Flag: com.android.net.flags.carrier_aware_avoid_bad_wifi
Bug: 410976315
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.ConnectivitySettingsManagerTest
Change-Id: I79469cfe865a585593219d226c8198206c06b589
2025-06-10 12:18:35 +00:00
..
apf trivialize apf property accessor dead code 2022-11-04 11:43:22 +00:00
metrics Move bit utilities to BitUtils. 2022-10-12 16:39:37 +09:00
netstats Add NetworkTemplate get/set transport type methods 2025-06-09 14:09:46 +08:00
nsd [mdns] add hidden API for public key 2024-04-24 07:02:42 +00:00
util Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
CaptivePortalDataTest.kt Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
CaptivePortalTest.java CaptivePortal: implement setDelegateUid API. 2024-12-11 20:27:10 +09:00
ConnectivityDiagnosticsManagerTest.java Do not verify field count in tests used in CTS 2022-01-18 16:55:32 +09:00
ConnectivitySettingsManagerTest.kt Introduce carrier-aware avoid bad Wi-Fi APIs 2025-06-10 12:18:35 +00:00
DependenciesTest.java Move net unit tests to packages/Connectivity 2021-05-13 08:30:33 +00:00
DhcpInfoTest.java Do not verify field count in tests used in CTS 2022-01-18 16:55:32 +09:00
EthernetNetworkManagementExceptionTest.java Remove deprecated SC_V2 constant 2025-05-15 09:03:59 +09:00
InvalidPacketExceptionTest.kt Add basic tests for InvalidPacketException 2021-06-23 09:16:59 +00:00
IpPrefixTest.java Mark connectivity module tests as such 2022-01-18 16:55:44 +09:00
KeepalivePacketDataTest.kt Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
LinkAddressTest.java Mark connectivity module tests as such 2022-01-18 16:55:44 +09:00
LinkPropertiesTest.java Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
MatchAllNetworkSpecifierTest.kt Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
NattKeepalivePacketDataTest.kt Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
NetworkAgentConfigTest.kt Revert "Add SkipNativeNetworkCreation flag in NetworkAgentConfig" 2025-02-26 01:30:20 -08:00
NetworkCapabilitiesTest.java Remove deprecated SC_V2 constant 2025-05-15 09:03:59 +09:00
NetworkProviderTest.kt Remove RecorderCallback. 2025-05-19 16:35:53 +09:00
NetworkSpecifierTest.kt Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
NetworkStackTest.java Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
NetworkStateSnapshotTest.kt Mark connectivity module tests as such 2022-01-18 16:55:44 +09:00
NetworkTest.java Parcel Network#mPrivateDnsBypass 2025-04-07 11:46:38 +09:00
OemNetworkPreferencesTest.java Mark connectivity module tests as such 2022-01-18 16:55:44 +09:00
RouteInfoTest.java Remove @IgnoreUpTo(Q) annotation and isAtLeastR() check 2023-11-06 09:35:28 +00:00
TcpKeepalivePacketDataTest.kt Do not verify field count in tests used in CTS 2022-01-18 16:55:32 +09:00
UidRangeTest.java Mark connectivity module tests as such 2022-01-18 16:55:44 +09:00
UnderlyingNetworkInfoTest.kt Mark connectivity module tests as such 2022-01-18 16:55:44 +09:00
VpnTransportInfoTest.java Rename getBypassable to isBypassable 2022-12-15 04:22:43 +00:00