mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-28 04:05:49 +01:00
chore: Fix merge fix for 19.34 target
This commit is contained in:
parent
fec90fd7f2
commit
053ebe34f0
@ -4,10 +4,10 @@ import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class SlideToSeekPatch {
|
||||
private static final Boolean SLIDE_TO_SEEK_DISABLED = !Settings.SLIDE_TO_SEEK.get();
|
||||
private static final boolean SLIDE_TO_SEEK_DISABLED = !Settings.SLIDE_TO_SEEK.get();
|
||||
|
||||
public static boolean isSlideToSeekDisabled(boolean isDisabled) {
|
||||
if (!isDisabled) return isDisabled;
|
||||
if (!isDisabled) return false;
|
||||
|
||||
return SLIDE_TO_SEEK_DISABLED;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import app.revanced.extension.youtube.shared.PlayerType;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class ShortsFilter extends Filter {
|
||||
public static final Boolean HIDE_SHORTS_NAVIGATION_BAR = Settings.HIDE_SHORTS_NAVIGATION_BAR.get();
|
||||
private static final boolean HIDE_SHORTS_NAVIGATION_BAR = Settings.HIDE_SHORTS_NAVIGATION_BAR.get();
|
||||
private final static String REEL_CHANNEL_BAR_PATH = "reel_channel_bar.eml";
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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 }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user