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
@@ -3,6 +3,6 @@ package app.revanced.patches.youtube.layout.autocaptions.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"))])
@Compatibility([Package("com.google.android.youtube", arrayOf("18.16.37", "18.19.35", "18.20.39", "18.23.35"))])
@Target(AnnotationTarget.CLASS)
internal annotation class AutoCaptionsCompatibility
@@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.autocaptions.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object StartVideoInformerFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L", "L", "L"), listOf(
@@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.autocaptions.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object SubtitleButtonControllerFingerprint : MethodFingerprint(
returnType = "V",
@@ -19,5 +19,8 @@ object SubtitleButtonControllerFingerprint : MethodFingerprint(
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.IGET_OBJECT,
)
),
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("SubtitleButtonController;")
}
)
@@ -2,8 +2,8 @@ package app.revanced.patches.youtube.layout.autocaptions.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object SubtitleTrackFingerprint : MethodFingerprint(
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
@@ -6,6 +6,8 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.settings.preference.impl.StringResource
@@ -27,7 +29,7 @@ class AutoCaptionsPatch : BytecodePatch(
StartVideoInformerFingerprint, SubtitleButtonControllerFingerprint, SubtitleTrackFingerprint
)
) {
override fun execute(context: BytecodeContext) {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_auto_captions",
@@ -70,5 +72,7 @@ class AutoCaptionsPatch : BytecodePatch(
nop
"""
)
return PatchResultSuccess()
}
}