Merge "[Thread] add logs for Thread enabled state" into main

This commit is contained in:
Treehugger Robot 2024-03-27 03:49:11 +00:00 • committed by Gerrit Code Review
commit 40029ad089

View file

@ -405,7 +405,10 @@ final class ThreadNetworkControllerService extends IThreadNetworkController.Stub
public void initialize() {
mHandler.post(
() -> {
Log.d(TAG, "Initializing Thread system service...");
Log.d(
TAG,
"Initializing Thread system service: Thread is "
+ (isEnabled() ? "enabled" : "disabled"));
try {
mTunIfController.createTunInterface();
} catch (IOException e) {
@ -490,6 +493,8 @@ final class ThreadNetworkControllerService extends IThreadNetworkController.Stub
return;
}
Log.i(TAG, "Set Thread enabled: " + isEnabled + ", persist: " + persist);
if (persist) {
// The persistent setting keeps the desired enabled state, thus it's set regardless
// the otDaemon set enabled state operation succeeded or not, so that it can recover