Set Thread Network country code from location country code
This CL selects the Thread country code from location country code.
If the location country code is not avaliable, the country code `WW`
will be selected as the default Thread country code.
This CL also adds Shell commands for developers to override the Thread
country code for testing.
Bug: b/309357909
Test: Run `atest ThreadNetworkUnitTests`.
Change-Id: Id87c293005f0e75922a72854b40c41837b74397f
diff --git a/thread/tests/unit/Android.bp b/thread/tests/unit/Android.bp
index 8092693..74b4a35 100644
--- a/thread/tests/unit/Android.bp
+++ b/thread/tests/unit/Android.bp
@@ -31,14 +31,15 @@
"general-tests",
],
static_libs: [
- "androidx.test.ext.junit",
- "compatibility-device-util-axt",
+ "frameworks-base-testutils",
"framework-connectivity-pre-jarjar",
"framework-connectivity-t-pre-jarjar",
+ "framework-location.stubs.module_lib",
"guava",
"guava-android-testlib",
- "mockito-target-minus-junit4",
+ "mockito-target-extended-minus-junit4",
"net-tests-utils",
+ "service-thread-pre-jarjar",
"truth",
],
libs: [
@@ -46,6 +47,11 @@
"android.test.runner",
],
jarjar_rules: ":connectivity-jarjar-rules",
+ jni_libs: [
+ // these are needed for Extended Mockito
+ "libdexmakerjvmtiagent",
+ "libstaticjvmtiagent",
+ ],
// Test coverage system runs on different devices. Need to
// compile for all architectures.
compile_multilib: "both",