From 8354a879cfc6028820e2bb0e01d6f607e145c0f6 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 9 Aug 2023 12:23:56 +0200 Subject: [PATCH] feat(Tasker): Remove `Unlock trial` patch --- .../annotations/UnlockTrialCompatibility.kt | 8 ----- .../fingerprints/CheckLicenseFingerprint.kt | 7 ----- .../trial/unlock/patch/UnlockLicensePatch.kt | 30 ------------------- 3 files changed, 45 deletions(-) delete mode 100644 src/main/kotlin/app/revanced/patches/tasker/trial/unlock/annotations/UnlockTrialCompatibility.kt delete mode 100644 src/main/kotlin/app/revanced/patches/tasker/trial/unlock/fingerprints/CheckLicenseFingerprint.kt delete mode 100644 src/main/kotlin/app/revanced/patches/tasker/trial/unlock/patch/UnlockLicensePatch.kt diff --git a/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/annotations/UnlockTrialCompatibility.kt b/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/annotations/UnlockTrialCompatibility.kt deleted file mode 100644 index 3f1c42eae8..0000000000 --- a/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/annotations/UnlockTrialCompatibility.kt +++ /dev/null @@ -1,8 +0,0 @@ -package app.revanced.patches.tasker.trial.unlock.annotations - -import app.revanced.patcher.annotation.Compatibility -import app.revanced.patcher.annotation.Package - -@Compatibility([Package("net.dinglisch.android.taskerm")]) -@Target(AnnotationTarget.CLASS) -internal annotation class UnlockTrialCompatibility diff --git a/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/fingerprints/CheckLicenseFingerprint.kt b/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/fingerprints/CheckLicenseFingerprint.kt deleted file mode 100644 index d02ce92616..0000000000 --- a/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/fingerprints/CheckLicenseFingerprint.kt +++ /dev/null @@ -1,7 +0,0 @@ -package app.revanced.patches.tasker.trial.unlock.fingerprints - -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint - -object CheckLicenseFingerprint : MethodFingerprint( - strings = listOf("Can't check license") -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/patch/UnlockLicensePatch.kt b/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/patch/UnlockLicensePatch.kt deleted file mode 100644 index b96823f02d..0000000000 --- a/src/main/kotlin/app/revanced/patches/tasker/trial/unlock/patch/UnlockLicensePatch.kt +++ /dev/null @@ -1,30 +0,0 @@ -package app.revanced.patches.tasker.trial.unlock.patch - -import app.revanced.extensions.toErrorResult -import app.revanced.patcher.annotation.Description -import app.revanced.patcher.annotation.Name -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.PatchResultSuccess -import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.tasker.trial.unlock.annotations.UnlockTrialCompatibility -import app.revanced.patches.tasker.trial.unlock.fingerprints.CheckLicenseFingerprint - -@Patch -@Name("Unlock trial") -@Description("Unlocks the trial version.") -@UnlockTrialCompatibility -class UnlockLicensePatch : BytecodePatch( - listOf( - CheckLicenseFingerprint - ) -) { - override fun execute(context: BytecodeContext) = CheckLicenseFingerprint - .result - ?.mutableMethod - // Return the method early, which prompts the user with a non dismissible dialog, when the trial period is over. - ?.addInstruction(0, "return-void") - ?.let { PatchResultSuccess() } - ?: CheckLicenseFingerprint.toErrorResult() -} \ No newline at end of file