Adopt mainline beta program for local network agent

Unifies the `TETHERING_LOCAL_NETWORK_AGENT` and
`WIFIP2PGO_LOCAL_NETWORK_AGENT` legacy feature flags into a
single mainline beta aconfig flag:
`tethering_and_p2p_go_local_network_agent`.

This change simplifies the logic for enabling the `NetworkAgent`
for both standard tethering (global scope) and Wi-Fi P2P Group
Owner mode (local scope). The agent is now enabled for both use
cases when the new flag is on.

The implementation in `IpServer` and associated tests have
been updated to use the new unified flag.

Flag: com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent
Bug: 420590461
Test: atest TetheringTests
Test: adb root
      adb shell device_config put com_android_tethering com.android.tethering.mainline.beta.tethering_and_p2p_go_local_agent true
      adb reboot
      atest CtsTetheringTest --test-filter '.*Agent.*'
Test: atest ConnectivityCoverageTests:android.net.ip.IpServerTest --update-device
Change-Id: I55817132c57a04b4f7b7bac61b5741f45ba16182
This commit is contained in:
Junyu Lai 2025-08-12 16:34:56 +08:00
commit dc420ccccb

View file

@ -66,6 +66,7 @@ java_defaults {
"connectivity-net-module-utils-bpf",
"com.android.net.flags-aconfig-java",
"com.android.tethering.beta.test.flags-aconfig-java",
"com.android.tethering.mainline.beta.flags-aconfig-java",
"modules-utils-build",
"modules-utils-statemachine",
"networkstack-client",