mirror of
https://github.com/revanced/revanced-patches
synced 2025-01-06 00:25:49 +01:00
fix: autoplay not working.
This commit is contained in:
parent
4f961298f6
commit
586eed515f
@ -6,7 +6,6 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.removeInstruction
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
import app.revanced.patcher.extensions.replaceInstructions
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Dependencies
|
import app.revanced.patcher.patch.annotations.Dependencies
|
||||||
@ -53,11 +52,15 @@ class HideAutoplayButton : BytecodePatch(
|
|||||||
val autonavInformerMethod = AutonavInformerFingerprint.result!!.mutableMethod
|
val autonavInformerMethod = AutonavInformerFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
//force disable autoplay since it's hard to do without the button
|
//force disable autoplay since it's hard to do without the button
|
||||||
autonavInformerMethod.replaceInstructions(
|
autonavInformerMethod.addInstructions(
|
||||||
0, """
|
0, """
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/HideAutoplayButtonPatch;->isButtonHidden()Z
|
invoke-static {}, Lapp/revanced/integrations/patches/HideAutoplayButtonPatch;->isButtonHidden()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
|
if-eqz v0, :hidden
|
||||||
|
const/4 v0, 0x0
|
||||||
return v0
|
return v0
|
||||||
|
:hidden
|
||||||
|
nop
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -73,7 +76,7 @@ class HideAutoplayButton : BytecodePatch(
|
|||||||
method.removeInstruction(index)
|
method.removeInstruction(index)
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
index, """
|
index, """
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/HideAutoplayButtonPatch;->isButtonHidden()Z
|
invoke-static {}, Lapp/revanced/integrations/patches/HideAutoplayButtonPatch;->isButtonShown()Z
|
||||||
move-result v11
|
move-result v11
|
||||||
if-eqz v11, :hidebutton
|
if-eqz v11, :hidebutton
|
||||||
invoke-virtual {v${insn.registerC}, v${insn.registerD}, v${insn.registerE}}, $methodToCall
|
invoke-virtual {v${insn.registerC}, v${insn.registerD}, v${insn.registerE}}, $methodToCall
|
||||||
|
Loading…
Reference in New Issue
Block a user