diff --git a/manager/src/main/java/moe/shizuku/manager/ShizukuManagerProvider.kt b/manager/src/main/java/moe/shizuku/manager/ShizukuManagerProvider.kt index cca466656..8bc4f446d 100644 --- a/manager/src/main/java/moe/shizuku/manager/ShizukuManagerProvider.kt +++ b/manager/src/main/java/moe/shizuku/manager/ShizukuManagerProvider.kt @@ -7,6 +7,7 @@ import moe.shizuku.manager.utils.Logger.LOGGER import rikka.shizuku.Shizuku import rikka.shizuku.ShizukuApiConstants.USER_SERVICE_ARG_TOKEN import rikka.shizuku.ShizukuProvider +import rikka.shizuku.server.ktx.workerHandler import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import java.util.concurrent.TimeoutException @@ -55,7 +56,7 @@ class ShizukuManagerProvider : ShizukuProvider() { } } - Shizuku.addBinderReceivedListenerSticky(listener) + Shizuku.addBinderReceivedListenerSticky(listener, workerHandler) return try { countDownLatch.await(5, TimeUnit.SECONDS) diff --git a/manager/src/main/java/moe/shizuku/manager/authorization/RequestPermissionActivity.kt b/manager/src/main/java/moe/shizuku/manager/authorization/RequestPermissionActivity.kt index b55a3fa1e..2523ade6e 100644 --- a/manager/src/main/java/moe/shizuku/manager/authorization/RequestPermissionActivity.kt +++ b/manager/src/main/java/moe/shizuku/manager/authorization/RequestPermissionActivity.kt @@ -19,6 +19,7 @@ import rikka.html.text.HtmlCompat import rikka.shizuku.Shizuku import rikka.shizuku.ShizukuApiConstants.REQUEST_PERMISSION_REPLY_ALLOWED import rikka.shizuku.ShizukuApiConstants.REQUEST_PERMISSION_REPLY_IS_ONETIME +import rikka.shizuku.server.ktx.workerHandler import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import java.util.concurrent.TimeoutException @@ -72,7 +73,7 @@ class RequestPermissionActivity : AppActivity() { } } - Shizuku.addBinderReceivedListenerSticky(listener) + Shizuku.addBinderReceivedListenerSticky(listener, workerHandler) return try { countDownLatch.await(5, TimeUnit.SECONDS) @@ -82,6 +83,7 @@ class RequestPermissionActivity : AppActivity() { false } } + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState)