From 4da268edc006ea496e3b1efd037676f1c40397da Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 23 May 2023 21:42:49 +0400 Subject: [PATCH] fix(photomath/unlock-plus): constrain to last working version (#2232) Co-authored-by: oSumAtrIX --- .../misc/unlockplus/annotations/UnlockPlusCompatibilty.kt | 8 ++++++++ .../photomath/misc/unlockplus/patch/UnlockPlusPatch.kt | 7 +++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/annotations/UnlockPlusCompatibilty.kt diff --git a/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/annotations/UnlockPlusCompatibilty.kt b/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/annotations/UnlockPlusCompatibilty.kt new file mode 100644 index 000000000..aa73c1fd3 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/annotations/UnlockPlusCompatibilty.kt @@ -0,0 +1,8 @@ +package app.revanced.patches.photomath.misc.unlockplus.annotations + +import app.revanced.patcher.annotation.Compatibility +import app.revanced.patcher.annotation.Package + +@Compatibility([Package("com.microblink.photomath", arrayOf("8.20.0"))]) +@Target(AnnotationTarget.CLASS) +internal annotation class UnlockPlusCompatibilty diff --git a/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/patch/UnlockPlusPatch.kt b/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/patch/UnlockPlusPatch.kt index bacb877e2..eb5cb8064 100644 --- a/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/patch/UnlockPlusPatch.kt +++ b/src/main/kotlin/app/revanced/patches/photomath/misc/unlockplus/patch/UnlockPlusPatch.kt @@ -1,10 +1,8 @@ package app.revanced.patches.photomath.misc.unlockplus.patch import app.revanced.extensions.toErrorResult -import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name -import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Version import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.addInstructions @@ -14,13 +12,14 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.photomath.detection.signature.patch.SignatureDetectionPatch +import app.revanced.patches.photomath.misc.unlockplus.annotations.UnlockPlusCompatibilty import app.revanced.patches.photomath.misc.unlockplus.fingerprints.IsPlusUnlockedFingerprint @Patch @Name("unlock-plus") @DependsOn([SignatureDetectionPatch::class]) @Description("Unlocks plus features.") -@Compatibility([Package("com.microblink.photomath")]) +@UnlockPlusCompatibilty @Version("0.0.1") class UnlockPlusPatch : BytecodePatch( listOf( @@ -41,4 +40,4 @@ class UnlockPlusPatch : BytecodePatch( return PatchResultSuccess() } -} +} \ No newline at end of file