Skip to content

Commit 14b5ecc

Browse files
committed
Fix bugs introduced in #658
We should name the arguments correctly, to not mix with private fields. Moreover, add module loading tag to `kModuleTags`.
1 parent e29ec54 commit 14b5ecc

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

daemon/src/main/jni/logcat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ constexpr std::array<char, ANDROID_LOG_SILENT + 1> kLogChar = {
3434

3535
// Module tags are sorted for O(log N) binary search.
3636
// These always route to the 'modules' (Xposed) log stream.
37-
constexpr auto kModuleTags =
38-
std::array{"VectorContext"sv, "VectorLegacyBridge"sv, "XSharedPreferences"sv};
37+
constexpr auto kModuleTags = std::array{"VectorContext"sv, "VectorLegacyBridge"sv,
38+
"VectorModuleManager"sv, "XSharedPreferences"sv};
3939

4040
// These route to the 'verbose' stream only.
4141
constexpr auto kExactTags = std::array{"APatchD"sv, "Dobby"sv, "KernelSU"sv, "LSPlant"sv,

xposed/src/main/kotlin/org/matrix/vector/impl/hooks/VectorChain.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,28 @@ class VectorChain(
4444

4545
override fun proceed(): Any? = internalProceed(thisObj, args)
4646

47-
override fun proceed(args: Array<Any?>): Any? = internalProceed(thisObj, args)
47+
override fun proceed(currentArgs: Array<Any?>): Any? = internalProceed(thisObj, currentArgs)
4848

4949
override fun proceedWith(thisObject: Any): Any? = internalProceed(thisObject, args)
5050

51-
override fun proceedWith(thisObject: Any, args: Array<Any?>): Any? = internalProceed(thisObject, args)
51+
override fun proceedWith(thisObject: Any, currentArgs: Array<Any?>): Any? =
52+
internalProceed(thisObject, currentArgs)
5253

5354
private fun internalProceed(thisObject: Any?, currentArgs: Array<Any?>): Any? {
5455
proceedCalled = true
5556

5657
// Reached the end of the modern hooks; trigger the original executable (and legacy hooks)
5758
if (index >= hooks.size) {
58-
return executeDownstream { terminal(thisObject, args) }
59+
return executeDownstream { terminal(thisObject, currentArgs) }
5960
}
6061

6162
val record = hooks[index]
62-
val nextChain = VectorChain(executable, thisObject, args, hooks, index + 1, terminal)
63+
val nextChain = VectorChain(executable, thisObject, currentArgs, hooks, index + 1, terminal)
6364

6465
return try {
6566
executeDownstream { record.hooker.intercept(nextChain) }
6667
} catch (t: Throwable) {
67-
handleInterceptorException(t, record, nextChain, thisObject, args)
68+
handleInterceptorException(t, record, nextChain, thisObject, currentArgs)
6869
}
6970
}
7071

0 commit comments

Comments
 (0)