Fix(Jakdojade) Code style fixes
This commit is contained in:
parent
0e020c5760
commit
7cf5102fb0
3 changed files with 23 additions and 28 deletions
|
|
@ -352,8 +352,8 @@ public final class app/revanced/patches/irplus/ad/RemoveAdsPatchKt {
|
|||
public static final fun getRemoveAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/jakdojade/ad/RemoveAdsPatchKt {
|
||||
public static final fun getRemoveAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
public final class app/revanced/patches/jakdojade/ad/DisableAdsPatchKt {
|
||||
public static final fun getDisableAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/letterboxd/ads/HideAdsPatchKt {
|
||||
|
|
|
|||
|
|
@ -2,40 +2,35 @@ package app.revanced.patches.jakdojade.ad
|
|||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val removeAdsPatch = bytecodePatch(
|
||||
name = "Remove ads",
|
||||
val disableAdsPatch = bytecodePatch(
|
||||
name = "Disable ads",
|
||||
) {
|
||||
compatibleWith("com.citynav.jakdojade.pl.android")
|
||||
|
||||
execute {
|
||||
// Spoof isPremium() to always return true
|
||||
// We can do this beacuse Jakdojade Premium's only feature is ad removal
|
||||
isPremiumFingerprint.method.replaceInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
// Spoof isPremium() to always return true.
|
||||
// We can do this beacuse Jakdojade Premium's only feature is ad removal.
|
||||
isPremiumFingerprint.method.returnEarly(true)
|
||||
|
||||
// Spoof Premium renewal date in the UI
|
||||
// We need to do the spoofing in order to avoid app crashes when opening profile menu
|
||||
premiumRenewalDateFingerprint.method.replaceInstructions(
|
||||
// Spoof Premium renewal date in the UI.
|
||||
// We need to do the spoofing in order to avoid app crashes when opening profile menu.
|
||||
getPremiumRenewalDateFingerprint.method.replaceInstructions(
|
||||
0,
|
||||
"""
|
||||
const-string v0, ""
|
||||
return-object v0
|
||||
""".trimIndent()
|
||||
"""
|
||||
)
|
||||
// Spoof Premium type
|
||||
// Spoof Premium type.
|
||||
getGoogleProductFingerprint.method.replaceInstructions(
|
||||
0,
|
||||
"""
|
||||
sget-object v0, Lcom/citynav/jakdojade/pl/android/billing/output/GoogleProduct;->PREMIUM_YEARLY_V4:Lcom/citynav/jakdojade/pl/android/billing/output/GoogleProduct;
|
||||
return-object v0
|
||||
""".trimIndent()
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -17,18 +17,18 @@ internal val isPremiumFingerprint = fingerprint {
|
|||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.CONST_4,
|
||||
Opcode.GOTO,
|
||||
Opcode.CONST_4,
|
||||
Opcode.RETURN
|
||||
// Opcode.IGET_OBJECT,
|
||||
// Opcode.INVOKE_VIRTUAL,
|
||||
// Opcode.MOVE_RESULT,
|
||||
// Opcode.IF_NEZ,
|
||||
// Opcode.CONST_4,
|
||||
// Opcode.GOTO,
|
||||
// Opcode.CONST_4,
|
||||
// Opcode.RETURN
|
||||
)
|
||||
}
|
||||
|
||||
internal val premiumRenewalDateFingerprint = fingerprint {
|
||||
internal val getPremiumRenewalDateFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameters()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue