fix: Revert previous release

The previous release depends on a version of ReVanced Patcher which prevents usage of resource patches on lower Android versions. To solve this issue temporarily, until a fix is present, the previous release is reverted.
This commit is contained in:
oSumAtrIX
2023-08-27 04:37:21 +02:00
parent ce2e46a7cb
commit 3938f2f1b3
496 changed files with 2551 additions and 2425 deletions
@@ -1,12 +1,14 @@
package app.revanced.patches.trakt.patch
import app.revanced.extensions.exception
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.addInstructions
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.trakt.annotations.UnlockProCompatibility
import app.revanced.patches.trakt.fingerprints.IsVIPEPFingerprint
@@ -20,18 +22,20 @@ import app.revanced.patches.trakt.fingerprints.RemoteUserFingerprint
class UnlockProPatch : BytecodePatch(
listOf(RemoteUserFingerprint)
) {
override fun execute(context: BytecodeContext) {
override fun execute(context: BytecodeContext): PatchResult {
RemoteUserFingerprint.result?.classDef?.let { remoteUserClass ->
arrayOf(IsVIPFingerprint, IsVIPEPFingerprint).onEach { fingerprint ->
// Resolve both fingerprints on the same class.
if (!fingerprint.resolve(context, remoteUserClass))
throw fingerprint.exception
throw fingerprint.toErrorResult()
}.forEach { fingerprint ->
// Return true for both VIP check methods.
fingerprint.result?.mutableMethod?.addInstructions(0, RETURN_TRUE_INSTRUCTIONS)
?: throw fingerprint.exception
?: return fingerprint.toErrorResult()
}
} ?: throw RemoteUserFingerprint.exception
} ?: return RemoteUserFingerprint.toErrorResult()
return PatchResultSuccess()
}
private companion object {