feat(Tasker): Remove Unlock trial patch

This commit is contained in:
oSumAtrIX 2023-08-09 12:23:56 +02:00
parent 45cc71f4d5
commit 8354a879cf
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
3 changed files with 0 additions and 45 deletions

View File

@ -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

View File

@ -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")
)

View File

@ -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()
}