mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-01 05:44:24 +02:00
feat: add or extension for AccessFlags
This commit is contained in:
parent
cb78c5a86f
commit
00c85b5d75
@ -0,0 +1,5 @@
|
||||
package app.revanced.patcher.extensions
|
||||
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
infix fun AccessFlags.or(other: AccessFlags) = this.value or other.value
|
@ -2,6 +2,7 @@ package patcher
|
||||
|
||||
import app.revanced.patcher.Patcher
|
||||
import app.revanced.patcher.cache.Cache
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.patch.Patch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
@ -18,7 +19,7 @@ fun main() {
|
||||
MethodSignature(
|
||||
"main-method",
|
||||
"V",
|
||||
AccessFlags.STATIC.value or AccessFlags.PUBLIC.value,
|
||||
AccessFlags.STATIC or AccessFlags.PUBLIC,
|
||||
listOf("[O"),
|
||||
arrayOf(
|
||||
Opcode.SGET_OBJECT,
|
||||
@ -84,6 +85,7 @@ fun main() {
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
patcher.addPatches(mainMethodPatchViaClassProxy, mainMethodPatchViaSignature)
|
||||
patcher.applyPatches()
|
||||
patcher.save()
|
||||
|
Loading…
x
Reference in New Issue
Block a user