From e0e5cd7fd2abb438bd8e21afdb2f49893479c3ed Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Sat, 20 Aug 2022 01:11:10 +0800 Subject: [PATCH] Fix a throwing bug in HandlerDelegate --- .../parasitic/activity/delegate/HandlerDelegate.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/HandlerDelegate.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/HandlerDelegate.kt index 5059545e..6bede6c5 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/HandlerDelegate.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/delegate/HandlerDelegate.kt @@ -89,11 +89,11 @@ internal class HandlerDelegate private constructor(private val baseInstance: Han if (intent.hasExtra(ActivityProxyConfig.proxyIntentName)) intent.getParcelableExtra(ActivityProxyConfig.proxyIntentName).also { subIntent -> if (Build.VERSION.SDK_INT >= 31) - ActivityThreadClass.method { name = "currentActivityThread" }.ignored().get().call() - ?.current()?.method { - name = "getLaunchingActivity" - param(IBinderClass) - }?.call(this@client.current().method { name = "getActivityToken" }.call()) + ActivityThreadClass.method { + name = "getLaunchingActivity" + param(IBinderClass) + }.ignored().get(ActivityThreadClass.method { name = "currentActivityThread" }.ignored().get().call()) + .call(this@client.current().method { name = "getActivityToken" }.call()) ?.current()?.field { name = "intent" }?.set(subIntent) set(subIntent) }