From 7ce24713546e8605ccc537de3a22681ca59dbaea Mon Sep 17 00:00:00 2001 From: Kangping Dong Date: Thu, 5 Dec 2024 15:54:55 +0800 Subject: [PATCH] [Thread] refactor OtDaemonServer::Initialize argument order see aosp/3391987 for background Change-Id: I798bfc172e3207c97d520785d62f5381c9d050ad --- .../server/thread/ThreadNetworkControllerService.java | 6 +++--- .../src/android/net/thread/BorderRoutingTest.java | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/thread/service/java/com/android/server/thread/ThreadNetworkControllerService.java b/thread/service/java/com/android/server/thread/ThreadNetworkControllerService.java index 30d5a02c67..c55096b1b4 100644 --- a/thread/service/java/com/android/server/thread/ThreadNetworkControllerService.java +++ b/thread/service/java/com/android/server/thread/ThreadNetworkControllerService.java @@ -351,14 +351,14 @@ final class ThreadNetworkControllerService extends IThreadNetworkController.Stub } otDaemon.initialize( - mTunIfController.getTunFd(), shouldEnableThread(), newOtDaemonConfig(mPersistentSettings.getConfiguration()), + mTunIfController.getTunFd(), mNsdPublisher, getMeshcopTxtAttributes(mResources.get()), - mOtDaemonCallbackProxy, mCountryCodeSupplier.get(), - FeatureFlags.isTrelEnabled()); + FeatureFlags.isTrelEnabled(), + mOtDaemonCallbackProxy); otDaemon.asBinder().linkToDeath(() -> mHandler.post(this::onOtDaemonDied), 0); mOtDaemon = otDaemon; mHandler.post(mNat64CidrController::maybeUpdateNat64Cidr); diff --git a/thread/tests/integration/src/android/net/thread/BorderRoutingTest.java b/thread/tests/integration/src/android/net/thread/BorderRoutingTest.java index aeeed65306..875a4ad116 100644 --- a/thread/tests/integration/src/android/net/thread/BorderRoutingTest.java +++ b/thread/tests/integration/src/android/net/thread/BorderRoutingTest.java @@ -16,7 +16,6 @@ package android.net.thread; -import static android.Manifest.permission.MANAGE_TEST_NETWORKS; import static android.net.InetAddresses.parseNumericAddress; import static android.net.thread.utils.IntegrationTestUtils.DEFAULT_DATASET; import static android.net.thread.utils.IntegrationTestUtils.buildIcmpv4EchoReply; @@ -38,7 +37,6 @@ import static android.system.OsConstants.ICMP_ECHO; import static com.android.net.module.util.NetworkStackConstants.ICMPV6_ECHO_REPLY_TYPE; import static com.android.net.module.util.NetworkStackConstants.ICMPV6_ECHO_REQUEST_TYPE; -import static com.android.testutils.TestPermissionUtil.runAsShell; import static com.google.common.truth.Truth.assertThat; @@ -56,7 +54,6 @@ import android.net.LinkProperties; import android.net.RouteInfo; import android.net.thread.utils.FullThreadDevice; import android.net.thread.utils.InfraNetworkDevice; -import android.net.thread.utils.IntegrationTestUtils; import android.net.thread.utils.OtDaemonController; import android.net.thread.utils.TestTunNetworkUtils; import android.net.thread.utils.ThreadFeatureCheckerRule;