fix: missing extension method doRecursively

This commit is contained in:
oSumAtrIX
2022-06-01 01:50:01 +02:00
parent 8a0ee03a71
commit e9c946008e
2 changed files with 7 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package app.revanced.extensions
import app.revanced.patcher.util.smali.toInstruction
import org.jf.dexlib2.builder.MutableMethodImplementation
import org.w3c.dom.Node
internal fun MutableMethodImplementation.injectHideCall(
index: Int,
@ -13,6 +14,11 @@ internal fun MutableMethodImplementation.injectHideCall(
)
}
internal fun Node.doRecursively(action: (Node) -> Unit) {
action(this)
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
}
internal fun String.startsWithAny(vararg prefix: String): Boolean {
for (_prefix in prefix)
if (this.startsWith(_prefix))