mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-22 00:57:07 +02:00
fix(mapper): content callback class
This commit is contained in:
parent
98d0f98714
commit
bfe367efd0
@ -4,6 +4,9 @@ import me.rhunk.snapenhance.mapper.AbstractClassMapper
|
|||||||
import me.rhunk.snapenhance.mapper.ext.getClassName
|
import me.rhunk.snapenhance.mapper.ext.getClassName
|
||||||
import me.rhunk.snapenhance.mapper.ext.getSuperClassName
|
import me.rhunk.snapenhance.mapper.ext.getSuperClassName
|
||||||
import me.rhunk.snapenhance.mapper.ext.isFinal
|
import me.rhunk.snapenhance.mapper.ext.isFinal
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.formats.Instruction21t
|
||||||
|
import org.jf.dexlib2.iface.instruction.formats.Instruction22t
|
||||||
|
|
||||||
class CallbackMapper : AbstractClassMapper() {
|
class CallbackMapper : AbstractClassMapper() {
|
||||||
init {
|
init {
|
||||||
@ -18,7 +21,9 @@ class CallbackMapper : AbstractClassMapper() {
|
|||||||
if (clazz.getClassName().endsWith("\$CppProxy")) return@filter false
|
if (clazz.getClassName().endsWith("\$CppProxy")) return@filter false
|
||||||
|
|
||||||
// ignore dummy ContentCallback class
|
// ignore dummy ContentCallback class
|
||||||
if (superclassName.endsWith("ContentCallback") && !clazz.methods.first { it.name == "<init>" }.parameterTypes.contains("Z"))
|
if (superclassName.endsWith("ContentCallback") && clazz.methods.none { it.name == "handleContentResult" && it.implementation?.instructions?.firstOrNull { instruction ->
|
||||||
|
instruction is Instruction22t || instruction is Instruction21t
|
||||||
|
} != null})
|
||||||
return@filter false
|
return@filter false
|
||||||
|
|
||||||
val superClass = getClass(clazz.superclass) ?: return@filter false
|
val superClass = getClass(clazz.superclass) ?: return@filter false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user