mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
23 lines
805 B
Kotlin
23 lines
805 B
Kotlin
package app.revanced.patches.layout
|
|
|
|
import app.revanced.patcher.cache.Cache
|
|
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
|
|
|
|
class MinimizedPlayback : Patch("minimized-playback") {
|
|
override fun execute(cache: Cache): PatchResult {
|
|
// Instead of removing all instructions like Vanced,
|
|
// we return the method at the beginning instead
|
|
cache.methodMap["minimized-playback-manager"]
|
|
.method
|
|
.implementation!!
|
|
.addInstruction(
|
|
0,
|
|
BuilderInstruction10x(Opcode.RETURN_VOID)
|
|
)
|
|
return PatchResultSuccess()
|
|
}
|
|
} |