Add setEnabled API

setEnabled API is added to ThreadNetworkController, this
can be used by applications with privileged permission to set
Thread to enable/disabled state.

The Thread enabled state can be subscribed with
ThreadNetworkController#registerStateCallback.

When Thread is disabled, the join/scheduleMigration APIs will
fail with ERROR_THREAD_DISABLED.

When Thread is disabling, all commands will fail with ERROR_BUSY.

Bug: 299243765

Test: atest CtsThreadNetworkTestCases:android.net.thread.cts.ThreadNetworkControllerTest

Change-Id: Ifa7845bf1d5664ecd31ce74e24b3a839f92bba13
6 files changed