Fix a throwing bug in HandlerDelegate

This commit is contained in:
2022-08-20 01:11:10 +08:00
parent c16160017e
commit e0e5cd7fd2

View File

@@ -89,11 +89,11 @@ internal class HandlerDelegate private constructor(private val baseInstance: Han
if (intent.hasExtra(ActivityProxyConfig.proxyIntentName)) if (intent.hasExtra(ActivityProxyConfig.proxyIntentName))
intent.getParcelableExtra<Intent>(ActivityProxyConfig.proxyIntentName).also { subIntent -> intent.getParcelableExtra<Intent>(ActivityProxyConfig.proxyIntentName).also { subIntent ->
if (Build.VERSION.SDK_INT >= 31) if (Build.VERSION.SDK_INT >= 31)
ActivityThreadClass.method { name = "currentActivityThread" }.ignored().get().call() ActivityThreadClass.method {
?.current()?.method { name = "getLaunchingActivity"
name = "getLaunchingActivity" param(IBinderClass)
param(IBinderClass) }.ignored().get(ActivityThreadClass.method { name = "currentActivityThread" }.ignored().get().call())
}?.call(this@client.current().method { name = "getActivityToken" }.call()) .call(this@client.current().method { name = "getActivityToken" }.call())
?.current()?.field { name = "intent" }?.set(subIntent) ?.current()?.field { name = "intent" }?.set(subIntent)
set(subIntent) set(subIntent)
} }