mirror of
https://github.com/revanced/revanced-patches
synced 2025-01-12 00:15:49 +01:00
refactor: un-shadow variable name
This commit is contained in:
parent
6f16bb0925
commit
38a586f645
@ -174,7 +174,6 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Opcode.CONST_STRING -> {
|
Opcode.CONST_STRING -> {
|
||||||
|
|
||||||
when (((instruction as Instruction21c).reference as StringReference).string) {
|
when (((instruction as Instruction21c).reference as StringReference).string) {
|
||||||
stringReferences[0] -> {
|
stringReferences[0] -> {
|
||||||
val stringInstruction = instructions.elementAt(3)
|
val stringInstruction = instructions.elementAt(3)
|
||||||
@ -200,23 +199,23 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
|
|||||||
stringReferences[2] -> { // Litho ads
|
stringReferences[2] -> { // Litho ads
|
||||||
// create proxied method.
|
// create proxied method.
|
||||||
val proxy = data.proxy(classDef)
|
val proxy = data.proxy(classDef)
|
||||||
val mutableClass = proxy.resolve()
|
val proxiedClass = proxy.resolve()
|
||||||
|
|
||||||
// add getIsEmpty method
|
// add getIsEmpty method
|
||||||
mutableClass.addGetIsEmptyMethod()
|
proxiedClass.addGetIsEmptyMethod()
|
||||||
|
|
||||||
// get required method to patch and get references from
|
// get required method to patch and get references from
|
||||||
val lithoMethod = getLithoMethod(mutableClass)
|
val lithoMethod = getLithoMethod(proxiedClass)
|
||||||
?: return PatchResultError("Could not find required litho method to patch.")
|
?: return PatchResultError("Could not find required litho method to patch.")
|
||||||
val lithoMethodImplementation = lithoMethod.implementation!!
|
val lithoMethodImplementation = lithoMethod.implementation!!
|
||||||
|
|
||||||
// create and add getTemplateName method
|
// create and add getTemplateName method
|
||||||
val getTemplateMethod =
|
val getTemplateMethod =
|
||||||
mutableClass.createGetTemplateNameMethod(lithoMethodImplementation)
|
proxiedClass.createGetTemplateNameMethod(lithoMethodImplementation)
|
||||||
mutableClass.addMethod(getTemplateMethod)
|
proxiedClass.addMethod(getTemplateMethod)
|
||||||
|
|
||||||
val lithoInstructions = lithoMethodImplementation.instructions
|
val lithoInstructions = lithoMethodImplementation.instructions
|
||||||
val thisType = mutableClass.type
|
val thisType = proxiedClass.type
|
||||||
val templateNameParameterType = getTemplateMethod.parameterTypes.first()
|
val templateNameParameterType = getTemplateMethod.parameterTypes.first()
|
||||||
|
|
||||||
// get reference descriptors
|
// get reference descriptors
|
||||||
|
Loading…
Reference in New Issue
Block a user