chore: Fix merge fix for 19.34 target

This commit is contained in:
LisoUseInAIKyrios
2024-10-28 05:21:12 -04:00
committed by oSumAtrIX
parent fec90fd7f2
commit 053ebe34f0
5 changed files with 18 additions and 18 deletions

View File

@ -38,7 +38,6 @@ val enableSlideToSeekPatch = bytecodePatch(
compatibleWith(
"com.google.android.youtube"(
"18.38.44",
"18.49.37",
"19.16.39",
"19.25.37",
@ -116,9 +115,9 @@ val enableSlideToSeekPatch = bytecodePatch(
addInstructions(
insertIndex,
"""
invoke-static { v$targetRegister }, $EXTENSION_METHOD_DESCRIPTOR
move-result v$targetRegister
"""
invoke-static { v$targetRegister }, $EXTENSION_METHOD_DESCRIPTOR
move-result v$targetRegister
"""
)
}
}

View File

@ -1,10 +1,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.literal
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 swipingUpGestureParentFingerprint = fingerprint {
returns("Z")
@ -63,13 +65,16 @@ internal val disableFastForwardNoticeFingerprint = fingerprint {
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
)
strings("search_landing_cache_key", "batterymanager")
custom { method, _ ->
method.name == "run"
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(fuzzyPatternScanThreshold = 3) {
internal val onTouchEventHandlerFingerprint = fingerprint {
accessFlags(AccessFlags.PUBLIC, AccessFlags.PUBLIC)
returns("Z")
parameters("L")
@ -103,9 +108,7 @@ internal val seekbarTappingFingerprint = fingerprint {
Opcode.RETURN,
Opcode.INVOKE_VIRTUAL,
)
custom { method, _ ->
method.containsLiteralInstruction(Integer.MAX_VALUE.toLong())
}
literal { Integer.MAX_VALUE.toLong() }
}
internal val slideToSeekFingerprint = fingerprint {

View File

@ -1,7 +1,7 @@
package app.revanced.patches.youtube.layout.player.overlay
import app.revanced.patcher.fingerprint
import app.revanced.util.containsLiteralInstruction
import app.revanced.util.literal
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
@ -14,7 +14,5 @@ internal val createPlayerOverviewFingerprint = fingerprint {
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
)
custom { method, _ ->
method.containsLiteralInstruction(scrimOverlayId)
}
literal { scrimOverlayId }
}