fix: exclusive-audio-playback patch (#153)

This commit is contained in:
Alberto Ponces 2022-07-11 19:05:03 +01:00 committed by GitHub
parent d7ef58f66e
commit 9beff9567f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,9 +26,7 @@ class ExclusiveAudioPatch : BytecodePatch(
) )
) { ) {
override fun execute(data: BytecodeData): PatchResult { override fun execute(data: BytecodeData): PatchResult {
ExclusiveAudioFingerprint.resolve(data, AudioOnlyEnablerFingerprint.result!!.classDef) val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod
val method = ExclusiveAudioFingerprint.result!!.mutableMethod
method.replaceInstruction(method.implementation!!.instructions.count() - 1, "const/4 v0, 0x1") method.replaceInstruction(method.implementation!!.instructions.count() - 1, "const/4 v0, 0x1")
method.addInstruction("return v0") method.addInstruction("return v0")