replaceHook
fun replaceHook(handle: XposedInterface.HookHandle, callback: IMethodHook): XposedInterface.HookHandle
用 before / after 回调原子替换已有 hook。
上游约束:替换会保留原 hook 的 executable、priority、exceptionMode 和 hook ID; 替换成功后传入的 handle 失效,调用方应使用返回的新 handle。
Parameters
handle
已有 hook 句柄
callback
新的 before / after 回调
fun replaceHook(handle: XposedInterface.HookHandle, callback: IReplaceHook): XposedInterface.HookHandle
用 replace 回调原子替换已有 hook。
上游约束:替换会保留原 hook 的 executable、priority、exceptionMode 和 hook ID; 替换成功后传入的 handle 失效,调用方应使用返回的新 handle。
Parameters
handle
已有 hook 句柄
callback
新的 replace 回调,返回值会作为原调用结果