mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-04 17:55:30 +08:00
refactor: make some change for dexkit
This commit is contained in:
@@ -171,7 +171,7 @@ object QQTIMHooker : YukiBaseHooker() {
|
|||||||
paramCount = 0
|
paramCount = 0
|
||||||
returnType = UnitType.name
|
returnType = UnitType.name
|
||||||
}
|
}
|
||||||
}.firstOrNull()?.getMethodInstance(classLoader)
|
}.singleOrNull()?.getMethodInstance(classLoader)
|
||||||
DexKitData.BaseChatPie_CancelRemainScreenOnMethod =
|
DexKitData.BaseChatPie_CancelRemainScreenOnMethod =
|
||||||
findMethod {
|
findMethod {
|
||||||
matcher {
|
matcher {
|
||||||
@@ -180,7 +180,7 @@ object QQTIMHooker : YukiBaseHooker() {
|
|||||||
paramCount = 0
|
paramCount = 0
|
||||||
returnType = UnitType.name
|
returnType = UnitType.name
|
||||||
}
|
}
|
||||||
}.firstOrNull()?.getMethodInstance(classLoader)
|
}.singleOrNull()?.getMethodInstance(classLoader)
|
||||||
}
|
}
|
||||||
val kotlinFunction0 = "kotlin.jvm.functions.Function0"
|
val kotlinFunction0 = "kotlin.jvm.functions.Function0"
|
||||||
findClass {
|
findClass {
|
||||||
@@ -198,7 +198,7 @@ object QQTIMHooker : YukiBaseHooker() {
|
|||||||
}
|
}
|
||||||
fields { count(6..Int.MAX_VALUE) }
|
fields { count(6..Int.MAX_VALUE) }
|
||||||
}
|
}
|
||||||
}.firstOrNull()?.name?.also { className ->
|
}.singleOrNull()?.name?.also { className ->
|
||||||
DexKitData.SimpleItemProcessorClass = className.toClass()
|
DexKitData.SimpleItemProcessorClass = className.toClass()
|
||||||
DexKitData.SimpleItemProcessorClass_OnClickMethod =
|
DexKitData.SimpleItemProcessorClass_OnClickMethod =
|
||||||
findMethod {
|
findMethod {
|
||||||
@@ -208,7 +208,7 @@ object QQTIMHooker : YukiBaseHooker() {
|
|||||||
returnType = UnitType.name
|
returnType = UnitType.name
|
||||||
usingNumbers(2)
|
usingNumbers(2)
|
||||||
}
|
}
|
||||||
}.firstOrNull()?.getMethodInstance(classLoader)
|
}.singleOrNull()?.getMethodInstance(classLoader)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,6 +51,6 @@ object DexKitHelper {
|
|||||||
*/
|
*/
|
||||||
fun create(param: PackageParam, initiate: DexKitBridge.() -> Unit) {
|
fun create(param: PackageParam, initiate: DexKitBridge.() -> Unit) {
|
||||||
load()
|
load()
|
||||||
runCatching { DexKitBridge.create(param.appInfo.sourceDir)?.use { initiate(it) } }
|
runCatching { DexKitBridge.create(param.appInfo.sourceDir).use { initiate(it) } }
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user