From 7ae9f8fa0a349b91853e9554f18e564ca6ff887c Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 6 Aug 2024 01:25:28 +0200 Subject: [PATCH] feat(CandyLink): Remove non-functional `Unlock pro` patch Servers now check the purchase status. --- .../patches/candylinkvpn/UnlockProPatch.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/candylinkvpn/UnlockProPatch.kt b/src/main/kotlin/app/revanced/patches/candylinkvpn/UnlockProPatch.kt index 3a878ddf7..ae7df4408 100644 --- a/src/main/kotlin/app/revanced/patches/candylinkvpn/UnlockProPatch.kt +++ b/src/main/kotlin/app/revanced/patches/candylinkvpn/UnlockProPatch.kt @@ -1,20 +1,23 @@ package app.revanced.patches.candylinkvpn -import app.revanced.util.exception import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.annotation.CompatiblePackage import app.revanced.patcher.patch.annotation.Patch import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint +import app.revanced.util.exception @Patch( - name = "Unlock pro", - compatiblePackages = [CompatiblePackage("com.candylink.openvpn")] + compatiblePackages = [CompatiblePackage("com.candylink.openvpn")], +) +@Deprecated( + "This patch does not work anymore and will be removed in the future, " + + "because the servers now check the purchase status.", ) @Suppress("unused") object UnlockProPatch : BytecodePatch( - setOf(IsPremiumPurchasedFingerprint) + setOf(IsPremiumPurchasedFingerprint), ) { override fun execute(context: BytecodeContext) { IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions( @@ -22,7 +25,7 @@ object UnlockProPatch : BytecodePatch( """ const/4 v0, 0x1 return v0 - """ + """, ) ?: throw IsPremiumPurchasedFingerprint.exception } -} \ No newline at end of file +}