fix: attempt on all patches
This commit is contained in:
@ -11,7 +11,7 @@ class CreateButtonRemover : Patch("create-button-remover") {
|
||||
val map = cache.methodMap["create-button-patch"]
|
||||
|
||||
// Hide the button view via proxy by passing it to the hideCreateButton method
|
||||
map.resolveAndGetMethod().implementation!!.addInstruction(
|
||||
map.method.implementation!!.addInstruction(
|
||||
map.scanData.endIndex,
|
||||
"invoke-static { v6 }, Lfi/razerman/youtube/XAdRemover;->hideCreateButton(Landroid/view/View;)V".asInstruction()
|
||||
)
|
||||
|
@ -8,7 +8,7 @@ import app.revanced.patcher.smali.asInstruction
|
||||
|
||||
class HideReels : Patch("hide-reels") {
|
||||
override fun execute(cache: Cache): PatchResult {
|
||||
val implementation = cache.methodMap["hide-reel-patch"].resolveAndGetMethod().implementation!!
|
||||
val implementation = cache.methodMap["hide-reel-patch"].method.implementation!!
|
||||
|
||||
// HideReel will hide the reel view before it is being used,
|
||||
// so we pass the view to the HideReel method
|
||||
|
@ -18,12 +18,12 @@ class HideSuggestions : Patch("hide-suggestions") {
|
||||
MethodSignature(
|
||||
"hide-suggestions-method",
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.PUBLIC,
|
||||
setOf("Z"),
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
arrayOf("Z"),
|
||||
arrayOf(
|
||||
Opcode.IPUT_BOOLEAN,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IPUT_BOOLEAN,
|
||||
Opcode.IGET_BOOLEAN,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.RETURN_VOID
|
||||
)
|
||||
@ -31,7 +31,7 @@ class HideSuggestions : Patch("hide-suggestions") {
|
||||
) ?: return PatchResultError("Parent method hide-suggestions-method has not been found")
|
||||
|
||||
// Proxy the first parameter by passing it to the RemoveSuggestions method
|
||||
map.resolveAndGetMethod().implementation!!.addInstructions(
|
||||
map.method.implementation!!.addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static { p1 }, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
||||
|
@ -12,7 +12,7 @@ class MinimizedPlayback : Patch("minimized-playback") {
|
||||
// Instead of removing all instructions like Vanced,
|
||||
// we return the method at the beginning instead
|
||||
cache.methodMap["minimized-playback-manager"]
|
||||
.resolveAndGetMethod()
|
||||
.method
|
||||
.implementation!!
|
||||
.addInstruction(
|
||||
0,
|
||||
|
@ -19,18 +19,20 @@ class OldQualityLayout : Patch("old-quality-restore") {
|
||||
"old-quality-patch-method",
|
||||
"L",
|
||||
AccessFlags.FINAL or AccessFlags.PUBLIC,
|
||||
emptySet(),
|
||||
emptyArray(),
|
||||
arrayOf(
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.IGET,
|
||||
Opcode.CONST_4,
|
||||
Opcode.IF_NE
|
||||
Opcode.IF_NE,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.GOTO,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.RETURN_OBJECT
|
||||
)
|
||||
)
|
||||
) ?: return PatchResultError("Parent method old-quality-patch-method has not been found")
|
||||
|
||||
|
||||
val implementation = map.resolveAndGetMethod().implementation!!
|
||||
val implementation = map.method.implementation!!
|
||||
|
||||
// if useOldStyleQualitySettings == true, jump over all instructions and return the field at the end
|
||||
val jmpInstruction =
|
||||
|
Reference in New Issue
Block a user