[Thread] add airplane mode support
Listens to airplane mode in Thread system service and enables/disables
Thread accordingly:
1. When airplane is on, disable Thread but don't persist the state
2. If Thread is explicitly enabled when airplane mode is on, Thread will
be enabled and the choice is remembered so that Thread will not be
disabled the next time airplane mode is turned on
3. If Thread is explicitly disabled when airplane mode is on, it will be
considered that the user wants to disable when airplane mode is
turned on, so Thread will be auto disabled the next time airplane
mode is turned on
The behavior described above is consistent with Wi-Fi and bluetooth.
Bug: 322742298
Change-Id: I1750922d9c304095e4114cddfbfe24d70d0e223a
diff --git a/thread/tests/unit/AndroidManifest.xml b/thread/tests/unit/AndroidManifest.xml
index ace7c52..8442e80 100644
--- a/thread/tests/unit/AndroidManifest.xml
+++ b/thread/tests/unit/AndroidManifest.xml
@@ -19,6 +19,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
package="android.net.thread.unittests">
+ <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
+
<application android:debuggable="true">
<uses-library android:name="android.test.runner" />
</application>