mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-11 13:46:17 +00:00
fix(YouTube - Slide to seek): Show tap and hold 2x speed overlay when active (#5398)
This commit is contained in:
committed by
GitHub
parent
e6f72bcb7d
commit
6833d37c26
@@ -73,12 +73,9 @@ val enableSlideToSeekPatch = bytecodePatch(
|
||||
|
||||
// Disable the double speed seek gesture.
|
||||
if (is_19_17_or_greater) {
|
||||
arrayOf(
|
||||
disableFastForwardGestureFingerprint,
|
||||
disableFastForwardNoticeFingerprint,
|
||||
).forEach { fingerprint ->
|
||||
fingerprint.method.apply {
|
||||
val targetIndex = fingerprint.patternMatch!!.endIndex
|
||||
disableFastForwardGestureFingerprint.let {
|
||||
it.method.apply {
|
||||
val targetIndex = it.patternMatch!!.endIndex
|
||||
val targetRegister = getInstruction<OneRegisterInstruction>(targetIndex).registerA
|
||||
|
||||
addInstructions(
|
||||
|
||||
@@ -3,14 +3,12 @@ package app.revanced.patches.youtube.interaction.seekbar
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.containsLiteralInstruction
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import app.revanced.util.indexOfFirstInstructionReversed
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||
|
||||
internal val swipingUpGestureParentFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
@@ -59,25 +57,6 @@ internal val disableFastForwardGestureFingerprint = fingerprint {
|
||||
}
|
||||
}
|
||||
|
||||
internal val disableFastForwardNoticeFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
opcodes(
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
)
|
||||
custom { method, _ ->
|
||||
method.name == "run" && method.indexOfFirstInstruction {
|
||||
// In later targets the code is found in different methods with different strings.
|
||||
val string = getReference<StringReference>()?.string
|
||||
string == "Failed to easy seek haptics vibrate." || string == "search_landing_cache_key"
|
||||
} >= 0
|
||||
}
|
||||
}
|
||||
|
||||
internal val onTouchEventHandlerFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.PUBLIC)
|
||||
returns("Z")
|
||||
|
||||
@@ -9,7 +9,6 @@ import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.InputType
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.TextPreference
|
||||
import app.revanced.patches.youtube.interaction.seekbar.disableFastForwardNoticeFingerprint
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.youtube.misc.litho.filter.addLithoFilter
|
||||
import app.revanced.patches.youtube.misc.litho.filter.lithoFilterPatch
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package app.revanced.patches.youtube.video.speed.custom
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||
|
||||
internal val speedLimiterFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
@@ -19,3 +22,16 @@ internal val speedLimiterFingerprint = fingerprint {
|
||||
Opcode.INVOKE_STATIC,
|
||||
)
|
||||
}
|
||||
|
||||
internal val disableFastForwardNoticeFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("V")
|
||||
parameters()
|
||||
custom { method, _ ->
|
||||
method.name == "run" && method.indexOfFirstInstruction {
|
||||
// In later targets the code is found in different methods with different strings.
|
||||
val string = getReference<StringReference>()?.string
|
||||
string == "Failed to easy seek haptics vibrate." || string == "search_landing_cache_key"
|
||||
} >= 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user