refactor(boostforreddit): DisableAdsPatch
This commit is contained in:
parent
8b833268bb
commit
968dfde7a8
2 changed files with 13 additions and 14 deletions
|
|
@ -1,17 +1,15 @@
|
|||
package app.revanced.patches.reddit.customclients.boostforreddit.ads
|
||||
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.patch.creatingBytecodePatch
|
||||
|
||||
@Suppress("unused")
|
||||
val disableAdsPatch = bytecodePatch(
|
||||
name = "Disable ads",
|
||||
) {
|
||||
@Suppress("unused", "ObjectPropertyName")
|
||||
val `Disable ads` by creatingBytecodePatch {
|
||||
compatibleWith("com.rubenmayayo.reddit")
|
||||
|
||||
apply {
|
||||
arrayOf(maxMediationFingerprint, admobMediationFingerprint).forEach { fingerprint ->
|
||||
fingerprint.method.addInstructions(0, "return-void")
|
||||
arrayOf(maxMediationMethod, admobMediationMethod).forEach { method ->
|
||||
method.addInstructions(0, "return-void")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
package app.revanced.patches.reddit.customclients.boostforreddit.ads
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.BytecodePatchContextMethodMatching.gettingFirstMutableMethodDeclaratively
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
|
||||
internal val maxMediationFingerprint = fingerprint {
|
||||
strings("MaxMediation: Attempting to initialize SDK")
|
||||
}
|
||||
internal val BytecodePatchContext.maxMediationMethod by gettingFirstMutableMethodDeclaratively(
|
||||
"MaxMediation: Attempting to initialize SDK"
|
||||
)
|
||||
|
||||
internal val admobMediationFingerprint = fingerprint {
|
||||
strings("AdmobMediation: Attempting to initialize SDK")
|
||||
}
|
||||
internal val BytecodePatchContext.admobMediationMethod by gettingFirstMutableMethodDeclaratively(
|
||||
"AdmobMediation: Attempting to initialize SDK"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue