android_packages_modules_Co.../common/flags.aconfig
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

218 lines
5.6 KiB
Text

package: "com.android.net.flags"
container: "com.android.tethering"
# This file contains aconfig flags for toggling features entirely implemented within the tethering
# module. Flags used from platform code must be in the android.net.platform.flags package in
# frameworks/base.
flag {
name: "set_data_saver_via_cm"
is_exported: true
namespace: "android_core_networking"
description: "Set data saver through ConnectivityManager API"
bug: "297836825"
is_fixed_read_only: true
}
flag {
name: "support_is_uid_networking_blocked"
is_exported: true
namespace: "android_core_networking"
description: "This flag controls whether isUidNetworkingBlocked is supported"
bug: "297836825"
is_fixed_read_only: true
}
flag {
name: "basic_background_restrictions_enabled"
is_exported: true
namespace: "android_core_networking"
description: "Block network access for apps in a low importance background state"
bug: "304347838"
is_fixed_read_only: true
}
flag {
name: "ipsec_transform_state"
is_exported: true
namespace: "android_core_networking_ipsec"
description: "The flag controls the access for getIpSecTransformState and IpSecTransformState"
bug: "308011229"
is_fixed_read_only: true
}
flag {
name: "tethering_with_soft_ap_config"
is_exported: true
namespace: "android_core_networking"
description: "The flag controls the access for the parcelable TetheringRequest with getSoftApConfiguration/setSoftApConfiguration API"
bug: "216524590"
is_fixed_read_only: true
}
flag {
name: "request_restricted_wifi"
is_exported: true
namespace: "android_core_networking"
description: "Flag for API to support requesting restricted wifi"
bug: "315835605"
is_fixed_read_only: true
}
flag {
name: "net_capability_local_network"
is_exported: true
namespace: "android_core_networking"
description: "Flag for local network capability API"
bug: "313000440"
is_fixed_read_only: true
}
flag {
name: "support_transport_satellite"
is_exported: true
namespace: "android_core_networking"
description: "Flag for satellite transport API"
bug: "320514105"
is_fixed_read_only: true
}
flag {
name: "nsd_subtypes_support_enabled"
is_exported: true
namespace: "android_core_networking"
description: "Flag for API to support nsd subtypes"
bug: "265095929"
is_fixed_read_only: true
}
flag {
name: "register_nsd_offload_engine_api"
is_exported: true
namespace: "android_core_networking"
description: "Flag for API to register nsd offload engine"
bug: "301713539"
is_fixed_read_only: true
}
flag {
name: "metered_network_firewall_chains"
is_exported: true
namespace: "android_core_networking"
description: "Flag for metered network firewall chain API"
bug: "332628891"
is_fixed_read_only: true
}
flag {
name: "blocked_reason_oem_deny_chains"
is_exported: true
namespace: "android_core_networking"
description: "Flag for oem deny chains blocked reasons API"
bug: "328732146"
is_fixed_read_only: true
}
flag {
name: "blocked_reason_network_restricted"
is_exported: true
namespace: "android_core_networking"
description: "Flag for BLOCKED_REASON_NETWORK_RESTRICTED API"
bug: "339559837"
is_fixed_read_only: true
}
flag {
name: "net_capability_not_bandwidth_constrained"
is_exported: true
namespace: "android_core_networking"
description: "Flag for NET_CAPABILITY_NOT_BANDWIDTH_CONSTRAINED API"
bug: "343823469"
is_fixed_read_only: true
}
flag {
name: "tethering_request_virtual"
is_exported: true
namespace: "android_core_networking"
description: "Flag for introducing TETHERING_VIRTUAL type"
bug: "340376953"
is_fixed_read_only: true
}
flag {
name: "netstats_add_entries"
is_exported: true
namespace: "android_core_networking"
description: "Flag for NetworkStats#addEntries API"
bug: "335680025"
is_fixed_read_only: true
}
flag {
name: "tethering_active_sessions_metrics"
is_exported: true
namespace: "android_core_networking"
description: "Flag for collecting tethering active sessions metrics"
bug: "354619988"
is_fixed_read_only: true
}
flag {
name: "ipv6_over_ble"
is_exported: true
namespace: "android_core_networking"
description: "API flag for IPv6 over BLE"
bug: "372936361"
is_fixed_read_only: true
}
flag {
name: "restrict_local_network"
is_exported: true
namespace: "android_core_networking"
description: "Flag for controlling access to the local network behind a new runtime permission. Requires ConnectivityCompatChanges.RESTRICT_LOCAL_NETWORK to enable feature."
bug: "388774939"
is_fixed_read_only: true
}
flag {
name: "mdns_advertising_improvement"
is_exported: true
namespace: "android_core_networking"
description: "Flag for MDNS advertising quality, reliability and performance improvement"
bug: "373270045"
}
flag {
name: "ethernet_desktop_config"
namespace: "android_core_networking"
description: "The flag controls support for ethernet configuration tracking and store by MAC address."
bug: "397536853"
is_fixed_read_only: true
}
flag {
name: "qos_filter_ip_range_matching"
namespace: "android_core_networking"
description: "Flag for API to provide IP address range based QoS socket matching."
bug: "406146808"
is_fixed_read_only: true
}
flag {
name: "netstats_transport_type"
is_exported: true
namespace: "android_core_networking"
description: "Flag for NetworkTemplate#get/setTransportType API"
bug: "419123367"
is_fixed_read_only: true
}
flag {
name: "carrier_aware_avoid_bad_wifi"
namespace: "android_core_networking"
description: "Flag for API to provide carrier-aware avoid bad Wi-Fi setting."
bug: "410976315"
is_fixed_read_only: true
}