mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 01:01:56 +01:00
feat(anytracker): remove unlock-premium
patch (#1094)
This commit is contained in:
parent
8ae5941e92
commit
c3818befc6
3 changed files with 0 additions and 59 deletions
|
@ -1,9 +0,0 @@
|
||||||
package app.revanced.patches.anytracker.misc.premium.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("com.shervinkoushan.anyTracker")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
|
||||||
internal annotation class UnlockPremiumCompatibility
|
|
|
@ -1,8 +0,0 @@
|
||||||
package app.revanced.patches.anytracker.misc.premium.fingerprints
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
object CheckPremiumFingerprint : MethodFingerprint(
|
|
||||||
customFingerprint = { methodDef ->
|
|
||||||
methodDef.definingClass.endsWith("BillingDataSource;") && methodDef.name == "isPurchased"
|
|
||||||
}
|
|
||||||
)
|
|
|
@ -1,42 +0,0 @@
|
||||||
package app.revanced.patches.anytracker.misc.premium.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
|
||||||
import app.revanced.patcher.extensions.removeInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.anytracker.misc.premium.annotations.UnlockPremiumCompatibility
|
|
||||||
import app.revanced.patches.anytracker.misc.premium.fingerprints.CheckPremiumFingerprint
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("unlock-premium")
|
|
||||||
@Description("Unlocks all premium features.")
|
|
||||||
@UnlockPremiumCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
class UnlockPremiumPatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
CheckPremiumFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
|
||||||
val method = CheckPremiumFingerprint.result!!.mutableMethod
|
|
||||||
method.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0x1
|
|
||||||
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
||||||
move-result-object v0
|
|
||||||
invoke-static {v0}, Lkotlinx/coroutines/flow/FlowKt;->flowOf(Ljava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
|
||||||
move-result-object v0
|
|
||||||
return-object v0
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue