Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions daemon/src/main/jni/logcat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ constexpr std::array<char, ANDROID_LOG_SILENT + 1> kLogChar = {

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

// These route to the 'verbose' stream only.
constexpr auto kExactTags = std::array{"APatchD"sv, "Dobby"sv, "KernelSU"sv, "LSPlant"sv,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,28 @@ class VectorChain(

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

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

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

override fun proceedWith(thisObject: Any, args: Array<Any?>): Any? = internalProceed(thisObject, args)
override fun proceedWith(thisObject: Any, currentArgs: Array<Any?>): Any? =
internalProceed(thisObject, currentArgs)

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

// Reached the end of the modern hooks; trigger the original executable (and legacy hooks)
if (index >= hooks.size) {
return executeDownstream { terminal(thisObject, args) }
return executeDownstream { terminal(thisObject, currentArgs) }
}

val record = hooks[index]
val nextChain = VectorChain(executable, thisObject, args, hooks, index + 1, terminal)
val nextChain = VectorChain(executable, thisObject, currentArgs, hooks, index + 1, terminal)

return try {
executeDownstream { record.hooker.intercept(nextChain) }
} catch (t: Throwable) {
handleInterceptorException(t, record, nextChain, thisObject, args)
handleInterceptorException(t, record, nextChain, thisObject, currentArgs)
}
}

Expand Down
Loading