fix: minimized-playback patch

This commit is contained in:
oSumAtrIX 2022-04-13 00:16:20 +02:00
parent f28f20974f
commit 55677a44ff
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -1,11 +1,11 @@
package app.revanced.patches.layout package app.revanced.patches.layout
import app.revanced.patcher.cache.Cache import app.revanced.patcher.cache.Cache
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.Patch import app.revanced.patcher.patch.Patch
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 org.jf.dexlib2.Opcode import app.revanced.patcher.smali.asInstructions
import org.jf.dexlib2.builder.instruction.BuilderInstruction10x
class MinimizedPlayback : Patch("minimized-playback") { class MinimizedPlayback : Patch("minimized-playback") {
override fun execute(cache: Cache): PatchResult { override fun execute(cache: Cache): PatchResult {
@ -14,9 +14,12 @@ class MinimizedPlayback : Patch("minimized-playback") {
cache.methodMap["minimized-playback-manager"] cache.methodMap["minimized-playback-manager"]
.method .method
.implementation!! .implementation!!
.addInstruction( .addInstructions(
0, 0,
BuilderInstruction10x(Opcode.RETURN_VOID) """
const/4 v0, 0x1
return v0
""".trimIndent().asInstructions()
) )
return PatchResultSuccess() return PatchResultSuccess()
} }