mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-19 09:19:23 +01:00
fix: autorepeat-by-default
patch (#148)
This commit is contained in:
parent
1fbc7b4337
commit
fe628ba909
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.autorepeat.annotations
|
||||
package app.revanced.patches.youtube.misc.autorepeat.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
@ -1,12 +1,12 @@
|
||||
package app.revanced.patches.youtube.layout.autorepeat.fingerprints
|
||||
package app.revanced.patches.youtube.misc.autorepeat.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||
import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.misc.autorepeat.annotations.AutoRepeatCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
@Name("auto-repeat-fingerprint")
|
||||
@ -25,8 +25,8 @@ public final void ae() {
|
||||
object AutoRepeatFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
listOf(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
customFingerprint = { methodDef -> methodDef.implementation!!.instructions.count() == 3 }
|
||||
customFingerprint = { methodDef -> methodDef.implementation!!.instructions.count() == 3 && methodDef.annotations.isEmpty()}
|
||||
)
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.autorepeat.fingerprints
|
||||
package app.revanced.patches.youtube.misc.autorepeat.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@ -6,7 +6,7 @@ import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||
import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility
|
||||
import app.revanced.patches.youtube.misc.autorepeat.annotations.AutoRepeatCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
@Name("auto-repeat-parent-fingerprint")
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.youtube.layout.autorepeat.patch
|
||||
package app.revanced.patches.youtube.misc.autorepeat.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
@ -13,9 +13,9 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Dependencies
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||
import app.revanced.patches.youtube.layout.autorepeat.annotations.AutoRepeatCompatibility
|
||||
import app.revanced.patches.youtube.layout.autorepeat.fingerprints.AutoRepeatFingerprint
|
||||
import app.revanced.patches.youtube.layout.autorepeat.fingerprints.AutoRepeatParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.autorepeat.annotations.AutoRepeatCompatibility
|
||||
import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatFingerprint
|
||||
import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatParentFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
|
||||
@Patch(include = false)
|
||||
@ -50,8 +50,7 @@ class AutoRepeatPatch : BytecodePatch(
|
||||
invoke-static {}, Lapp/revanced/integrations/patches/AutoRepeatPatch;->shouldAutoRepeat()Z
|
||||
move-result v0
|
||||
if-eqz v0, :noautorepeat
|
||||
const/4 v0, 0x0
|
||||
invoke-virtual {}, $methodToCall
|
||||
invoke-virtual {p0}, $methodToCall
|
||||
:noautorepeat
|
||||
return-void
|
||||
"""
|
Loading…
Reference in New Issue
Block a user