mirror of
https://github.com/revanced/revanced-patches
synced 2024-08-28 18:15:17 +02:00
fix(Tiktok - Show seekbar): Bump compatibility (#2737)
This commit is contained in:
parent
a519919779
commit
08413bdc97
@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.seekbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object ShouldShowSeekBarFingerprint : MethodFingerprint(
|
||||||
|
strings = listOf(
|
||||||
|
"can not show seekbar, state: 1, not in resume"
|
||||||
|
),
|
||||||
|
)
|
@ -5,14 +5,13 @@ import app.revanced.patcher.annotation.Description
|
|||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
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 app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility
|
import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility
|
||||||
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.SetSeekBarShowTypeFingerprint
|
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.SetSeekBarShowTypeFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22t
|
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.ShouldShowSeekBarFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Show seekbar")
|
@Name("Show seekbar")
|
||||||
@ -21,11 +20,21 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction22t
|
|||||||
class ShowSeekbarPatch : BytecodePatch(
|
class ShowSeekbarPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
SetSeekBarShowTypeFingerprint,
|
SetSeekBarShowTypeFingerprint,
|
||||||
|
ShouldShowSeekBarFingerprint,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
ShouldShowSeekBarFingerprint.result?.mutableMethod?.apply {
|
||||||
|
addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
SetSeekBarShowTypeFingerprint.result?.mutableMethod?.apply {
|
SetSeekBarShowTypeFingerprint.result?.mutableMethod?.apply {
|
||||||
val typeRegister = getInstruction<Instruction22t>(1).registerB
|
val typeRegister = implementation!!.registerCount - 1
|
||||||
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
0,
|
0,
|
||||||
|
Loading…
Reference in New Issue
Block a user