[Thread] add Thread toggle in settings
Allows a user to disable or enable Thread network / radio from
settings.
In this commit, a toggle is added to Settings > Connected devices >
Connection preferences to control Thread state. See the screenshots
below:
1. Thread is on: https://screenshot.googleplex.com/7FqqbzRX6rGwvSb
2. Thread is off: https://screenshot.googleplex.com/AmfRAhzuukULAAG
3. Thread is disabled by airplane mode: https://screenshot.googleplex.com/7zcesyomrveCqFE
4. Thread is searchable: https://screenshot.googleplex.com/9yFL2jeSuEhJwrS
Requirements:
1. the in-take bug: b/327098435
2. See the screenshot above
3. Test with `atest SettingsUnitTests` and manual tests
4. +2 from Yuwen
5. Flagged by "com.android.net.thread.platform.flags.Flags.thread_enabled_platform"
6. It doesn't need B&R, no preferences are added (the state is in
Android framework (mainline module))
7. Confirmed searchable
8. Code written in Kotlin
Bug: 296990038
Bug: 319077562
Test: atest SettingsUnitTests
Change-Id: Ifa2264b8e59a5112290fd0224cb75ad228732077
diff --git a/tests/unit/Android.bp b/tests/unit/Android.bp
index b4b79dd..9dbbe18 100644
--- a/tests/unit/Android.bp
+++ b/tests/unit/Android.bp
@@ -30,6 +30,7 @@
"androidx.test.espresso.intents-nodeps",
"androidx.test.ext.junit",
"androidx.preference_preference",
+ "flag-junit",
"mockito-target-minus-junit4",
"platform-test-annotations",
"platform-test-rules",