build(Needs bump): Bump dependencies (#2946)
Co-authored-by: Ushie <ushiekane@gmail.com> Co-authored-by: aAbed <aabedhkhan@gmail.com> Co-authored-by: CnC-Robert <CnC.Rob3rt@gmail.com>
This commit is contained in:
co-authored by
Ushie
aAbed
CnC-Robert
parent
fe3a6fd4a4
commit
8c8dff9078
+18
-21
@@ -1,25 +1,32 @@
|
||||
package app.revanced.patches.trakt.patch
|
||||
package app.revanced.patches.trakt
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.trakt.annotations.UnlockProCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.trakt.fingerprints.IsVIPEPFingerprint
|
||||
import app.revanced.patches.trakt.fingerprints.IsVIPFingerprint
|
||||
import app.revanced.patches.trakt.fingerprints.RemoteUserFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Unlock pro")
|
||||
@Description("Unlocks pro features.")
|
||||
@UnlockProCompatibility
|
||||
class UnlockProPatch : BytecodePatch(
|
||||
listOf(RemoteUserFingerprint)
|
||||
@Patch(
|
||||
name = "Unlock pro",
|
||||
compatiblePackages = [CompatiblePackage("tv.trakt.trakt", ["1.1.1"])]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object UnlockProPatch : BytecodePatch(
|
||||
setOf(RemoteUserFingerprint)
|
||||
) {
|
||||
private const val RETURN_TRUE_INSTRUCTIONS =
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
||||
move-result-object v1
|
||||
return-object v1
|
||||
"""
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
RemoteUserFingerprint.result?.classDef?.let { remoteUserClass ->
|
||||
arrayOf(IsVIPFingerprint, IsVIPEPFingerprint).onEach { fingerprint ->
|
||||
@@ -33,14 +40,4 @@ class UnlockProPatch : BytecodePatch(
|
||||
}
|
||||
} ?: throw RemoteUserFingerprint.exception
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val RETURN_TRUE_INSTRUCTIONS =
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
||||
move-result-object v1
|
||||
return-object v1
|
||||
"""
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.trakt.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("tv.trakt.trakt", arrayOf("1.1.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class UnlockProCompatibility
|
||||
Reference in New Issue
Block a user