feat(YouTube - Seekbar tapping): Support version 18.43.45

This commit is contained in:
oSumAtrIX 2023-11-11 18:08:52 +01:00
parent c5236f812e
commit eee51a863a
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
3 changed files with 11 additions and 15 deletions

View File

@ -27,14 +27,7 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
CompatiblePackage(
"com.google.android.youtube",
[
"18.16.37",
"18.19.35",
"18.20.39",
"18.23.35",
"18.29.38",
"18.32.39",
"18.37.36",
"18.38.44"
"18.43.45"
]
)
]
@ -64,8 +57,8 @@ object EnableSeekbarTappingPatch : BytecodePatch(
.reference as MethodReference
buildMap {
put("O", getReference(patternScanResult.endIndex))
put("N", getReference(patternScanResult.startIndex))
put("O", getReference(patternScanResult.endIndex))
}
}

View File

@ -4,6 +4,10 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode
object IsSwipingUpFingerprint : MethodFingerprint(
returnType = "Z",
parameters = listOf("Landroid/view/MotionEvent;", "J"),
opcodes = listOf(Opcode.SGET_OBJECT)
opcodes = listOf(
Opcode.SGET_OBJECT,
Opcode.IGET_OBJECT
)
)

View File

@ -1,8 +1,8 @@
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.MethodFingerprint
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
@ -12,7 +12,7 @@ object OnTouchEventHandlerFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.PUBLIC,
parameters = listOf("L"),
opcodes = listOf(
Opcode.INVOKE_VIRTUAL, // oMethodReference
Opcode.INVOKE_VIRTUAL, // nMethodReference
Opcode.RETURN,
Opcode.IGET_OBJECT,
Opcode.IGET_BOOLEAN,
@ -23,10 +23,9 @@ object OnTouchEventHandlerFingerprint : MethodFingerprint(
Opcode.INT_TO_FLOAT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_NEZ,
Opcode.RETURN,
Opcode.IF_EQZ,
Opcode.INVOKE_VIRTUAL,
Opcode.INVOKE_VIRTUAL, // pMethodReference
Opcode.INVOKE_VIRTUAL, // oMethodReference
),
customFingerprint = { methodDef, _ -> methodDef.name == "onTouchEvent" }
)