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