This commit is contained in:
parent
df5a5f430d
commit
d1aeafaee6
|
@ -1098,6 +1098,16 @@ public final class app/revanced/patches/strava/upselling/DisableSubscriptionSugg
|
||||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/tasker/trial/unlock/fingerprints/CheckLicenseFingerprint : app/revanced/patcher/fingerprint/MethodFingerprint {
|
||||||
|
public static final field INSTANCE Lapp/revanced/patches/tasker/trial/unlock/fingerprints/CheckLicenseFingerprint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class app/revanced/patches/tasker/trial/unlock/patch/UnlockLicensePatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
|
public fun <init> ()V
|
||||||
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||||
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/ticktick/misc/themeunlock/UnlockProPatch : app/revanced/patcher/patch/BytecodePatch {
|
public final class app/revanced/patches/ticktick/misc/themeunlock/UnlockProPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||||
public static final field INSTANCE Lapp/revanced/patches/ticktick/misc/themeunlock/UnlockProPatch;
|
public static final field INSTANCE Lapp/revanced/patches/ticktick/misc/themeunlock/UnlockProPatch;
|
||||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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
|
|
|
@ -1,6 +1,6 @@
|
||||||
package app.revanced.patches.tasker.trial.unlock.fingerprints
|
package app.revanced.patches.tasker.trial.unlock.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
object CheckLicenseFingerprint : MethodFingerprint(
|
object CheckLicenseFingerprint : MethodFingerprint(
|
||||||
strings = listOf("Can't check license")
|
strings = listOf("Can't check license")
|
||||||
|
|
|
@ -1,30 +1,25 @@
|
||||||
package app.revanced.patches.tasker.trial.unlock.patch
|
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.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patches.tasker.trial.unlock.annotations.UnlockTrialCompatibility
|
|
||||||
import app.revanced.patches.tasker.trial.unlock.fingerprints.CheckLicenseFingerprint
|
import app.revanced.patches.tasker.trial.unlock.fingerprints.CheckLicenseFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Unlock trial")
|
name = "Unlock trial",
|
||||||
@Description("Unlocks the trial version.")
|
description = "Unlocks the trial version.",
|
||||||
@UnlockTrialCompatibility
|
compatiblePackages = [CompatiblePackage("net.dinglisch.android.taskerm")]
|
||||||
|
)
|
||||||
class UnlockLicensePatch : BytecodePatch(
|
class UnlockLicensePatch : BytecodePatch(
|
||||||
listOf(
|
setOf(CheckLicenseFingerprint)
|
||||||
CheckLicenseFingerprint
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) = CheckLicenseFingerprint
|
override fun execute(context: BytecodeContext) {
|
||||||
.result
|
CheckLicenseFingerprint.result?.let { result ->
|
||||||
?.mutableMethod
|
result
|
||||||
// Return the method early, which prompts the user with a non dismissible dialog, when the trial period is over.
|
.mutableMethod
|
||||||
?.addInstruction(0, "return-void")
|
.addInstruction(0, "return-void")
|
||||||
?.let { PatchResultSuccess() }
|
}
|
||||||
?: CheckLicenseFingerprint.toErrorResult()
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue