[Thread] make the IOtDaemon interface oneway

Also cleans up unused APIs

Bug: 262683651
Test: atest CtsThreadNetworkTestCases
Change-Id: I916c2fc2c06293e9c73010d216059323dbccbb52
diff --git a/src/android/aidl/com/android/server/thread/openthread/IOtDaemon.aidl b/src/android/aidl/com/android/server/thread/openthread/IOtDaemon.aidl
index f24fd7f..0dd1fdc 100644
--- a/src/android/aidl/com/android/server/thread/openthread/IOtDaemon.aidl
+++ b/src/android/aidl/com/android/server/thread/openthread/IOtDaemon.aidl
@@ -38,7 +38,7 @@
  * The OpenThread daemon service which provides access to the core Thread stack for
  * system_server.
  */
-interface IOtDaemon {
+oneway interface IOtDaemon {
     /**
      * The Thread tunnel interface name. This interface MUST be created before
      * starting this {@link IOtDaemon} service.
@@ -52,23 +52,14 @@
      *              packets to/from Thread PAN
      * @param callback the cllback for receiving all Thread stack events
      */
-    // Okay to be blocking API, this doesn't call into OT stack
     void initialize(in ParcelFileDescriptor tunFd, in IOtDaemonCallback callback);
 
-    /** Returns the Extended MAC Address of this Thread device. */
-    // Okay to be blocking, this is already cached in memory
-    byte[] getExtendedMacAddress();
-
-    /** Returns the Thread version that this Thread device is running. */
-    // Okay to be blocking, this is in-memory-only value
-    int getThreadVersion();
-
     /**
      * Joins this device to the network specified by {@code activeOpDatasetTlvs}.
      *
      * @sa android.net.thread.ThreadNetworkController#join
      */
-    oneway void join(
+    void join(
         boolean doForm, in byte[] activeOpDatasetTlvs, in IOtStatusReceiver receiver);
 
     /**
@@ -83,13 +74,13 @@
      *
      * @sa android.net.thread.ThreadNetworkController#leave
      */
-    oneway void leave(in IOtStatusReceiver receiver);
+    void leave(in IOtStatusReceiver receiver);
 
     /** Migrates to the new network specified by {@code pendingOpDatasetTlvs}.
      *
      * @sa android.net.thread.ThreadNetworkController#scheduleMigration
      */
-    oneway void scheduleMigration(
+    void scheduleMigration(
         in byte[] pendingOpDatasetTlvs, in IOtStatusReceiver receiver);
 
     // TODO: add Border Router APIs
diff --git a/src/android/otdaemon_server.cpp b/src/android/otdaemon_server.cpp
index bad693a..1e30c2d 100644
--- a/src/android/otdaemon_server.cpp
+++ b/src/android/otdaemon_server.cpp
@@ -444,47 +444,6 @@
     otbrLogDebug("otDatasetSendMgmtPendingSet callback: %d", aResult);
 }
 
-Status OtDaemonServer::getExtendedMacAddress(std::vector<uint8_t> *aExtendedMacAddress)
-{
-    Status              status = Status::ok();
-    const otExtAddress *extAddress;
-
-    if (aExtendedMacAddress == nullptr)
-    {
-        status =
-            Status::fromServiceSpecificErrorWithMessage(OT_ERROR_INVALID_ARGS, "aExtendedMacAddress can not be null");
-        ExitNow();
-    }
-
-    if (GetOtInstance() == nullptr)
-    {
-        status = Status::fromServiceSpecificErrorWithMessage(OT_ERROR_INVALID_STATE, "OT is not initialized");
-        ExitNow();
-    }
-
-    extAddress = otLinkGetExtendedAddress(GetOtInstance());
-    aExtendedMacAddress->assign(extAddress->m8, extAddress->m8 + sizeof(extAddress->m8));
-
-exit:
-    return status;
-}
-
-Status OtDaemonServer::getThreadVersion(int *aThreadVersion)
-{
-    Status status = Status::ok();
-
-    if (aThreadVersion == nullptr)
-    {
-        status = Status::fromServiceSpecificErrorWithMessage(OT_ERROR_INVALID_ARGS, "aThreadVersion can not be null");
-        ExitNow();
-    }
-
-    *aThreadVersion = otThreadGetVersion();
-
-exit:
-    return status;
-}
-
 binder_status_t OtDaemonServer::dump(int aFd, const char **aArgs, uint32_t aNumArgs)
 {
     OT_UNUSED_VARIABLE(aArgs);
diff --git a/src/android/otdaemon_server.hpp b/src/android/otdaemon_server.hpp
index b339dc6..490204f 100644
--- a/src/android/otdaemon_server.hpp
+++ b/src/android/otdaemon_server.hpp
@@ -82,8 +82,6 @@
     // Implements IOtDaemon.aidl
 
     Status initialize(const ScopedFileDescriptor &aTunFd, const std::shared_ptr<IOtDaemonCallback> &aCallback) override;
-    Status getExtendedMacAddress(std::vector<uint8_t> *aExtendedMacAddress) override;
-    Status getThreadVersion(int *aThreadVersion) override;
     bool   isAttached(void);
     Status join(bool                                      aDoForm,
                 const std::vector<uint8_t>               &aActiveOpDatasetTlvs,