From 73561713397732fc07a48930f0da757b4fbc67c4 Mon Sep 17 00:00:00 2001 From: Zhanglong Xia Date: Mon, 17 Mar 2025 10:51:24 +0800 Subject: [PATCH] [Thread] add country code overlay to enable/disable setting Thread country code Some android devices call the API `setChannelMaxPowers()` to set the Thread radio output power. Then there is no need for these devices to set the Thread country code. This commit adds an overlay configuration `config_thread_country_code_enabled` to enable/disable setting the Thread country code. Bug: b/402276117 Test: atest ThreadNetworkUnitTests:ThreadNetworkCountryCodeTest#initialize_countryCodeDisabled_defaultCountryCodeIsUsed Change-Id: I215c64757d0277853f8d4625ace363a4d7bb974b --- .../res/values/config_thread.xml | 9 +++++++++ .../thread/ThreadNetworkControllerService.java | 3 +++ .../server/thread/ThreadNetworkCountryCode.java | 11 +++++++++++ .../ThreadNetworkControllerServiceTest.java | 1 + .../thread/ThreadNetworkCountryCodeTest.java | 16 ++++++++++++++++ 5 files changed, 40 insertions(+) diff --git a/service/ServiceConnectivityResources/res/values/config_thread.xml b/service/ServiceConnectivityResources/res/values/config_thread.xml index 128a98f6d4..a458c7f4e3 100644 --- a/service/ServiceConnectivityResources/res/values/config_thread.xml +++ b/service/ServiceConnectivityResources/res/values/config_thread.xml @@ -30,6 +30,15 @@ --> false + + true +