Skip to content

Commit

Permalink
fix: minimized-playback patch
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Apr 12, 2022
1 parent f28f209 commit 55677a4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/kotlin/app/revanced/patches/layout/MinimizedPlayback.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package app.revanced.patches.layout

import app.revanced.patcher.cache.Cache
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction10x
import app.revanced.patcher.smali.asInstructions

class MinimizedPlayback : Patch("minimized-playback") {
override fun execute(cache: Cache): PatchResult {
Expand All @@ -14,9 +14,12 @@ class MinimizedPlayback : Patch("minimized-playback") {
cache.methodMap["minimized-playback-manager"]
.method
.implementation!!
.addInstruction(
.addInstructions(
0,
BuilderInstruction10x(Opcode.RETURN_VOID)
"""
const/4 v0, 0x1
return v0
""".trimIndent().asInstructions()
)
return PatchResultSuccess()
}
Expand Down

0 comments on commit 55677a4

Please sign in to comment.