From e5dcb72597092fb32003f11fdf6f861ede4e7ff3 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 23 Sep 2024 01:43:22 +0200 Subject: [PATCH] feat(TikTok): Bump patches to support the latest version 36.5.4 --- .../tiktok/feedfilter/FeedFilterPatch.kt | 14 ++--- ...ePatch.kt => RememberClearDisplayPatch.kt} | 33 +++++----- .../OnRenderFirstFrameFingerprint.kt | 9 --- .../interaction/downloads/DownloadsPatch.kt | 61 ++++++++----------- ...ngerprint.kt => DownloadUriFingerprint.kt} | 22 +++---- .../interaction/speed/PlaybackSpeedPatch.kt | 43 +++++++------ .../tiktok/misc/settings/SettingsPatch.kt | 4 +- .../fingerprints/GetEnterFromFingerprint.kt | 24 ++++++++ .../OnRenderFirstFrameFingerprint.kt | 7 ++- 9 files changed, 113 insertions(+), 104 deletions(-) rename src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/{RememberClearModePatch.kt => RememberClearDisplayPatch.kt} (76%) delete mode 100644 src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/fingerprints/OnRenderFirstFrameFingerprint.kt rename src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/{DownloadPathParentFingerprint.kt => DownloadUriFingerprint.kt} (50%) create mode 100644 src/main/kotlin/app/revanced/patches/tiktok/shared/fingerprints/GetEnterFromFingerprint.kt rename src/main/kotlin/app/revanced/patches/tiktok/{interaction/speed => shared}/fingerprints/OnRenderFirstFrameFingerprint.kt (63%) diff --git a/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/FeedFilterPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/FeedFilterPatch.kt index 35a6f77fea..74940a4600 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/FeedFilterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/FeedFilterPatch.kt @@ -17,16 +17,16 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction @Patch( name = "Feed filter", description = "Removes ads, livestreams, stories, image videos " + - "and videos with a specific amount of views or likes from the feed.", + "and videos with a specific amount of views or likes from the feed.", dependencies = [IntegrationsPatch::class, SettingsPatch::class], compatiblePackages = [ - CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]), - CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"]) - ] + CompatiblePackage("com.ss.android.ugc.trill", ["36.5.4"]), + CompatiblePackage("com.zhiliaoapp.musically", ["36.5.4"]), + ], ) @Suppress("unused") object FeedFilterPatch : BytecodePatch( - setOf(FeedApiServiceLIZFingerprint, SettingsStatusLoadFingerprint) + setOf(FeedApiServiceLIZFingerprint, SettingsStatusLoadFingerprint), ) { override fun execute(context: BytecodeContext) { FeedApiServiceLIZFingerprint.result?.mutableMethod?.apply { @@ -36,13 +36,13 @@ object FeedFilterPatch : BytecodePatch( addInstruction( returnFeedItemInstruction.location.index, "invoke-static { v$feedItemsRegister }, " + - "Lapp/revanced/integrations/tiktok/feedfilter/FeedItemsFilter;->filter(Lcom/ss/android/ugc/aweme/feed/model/FeedItemList;)V" + "Lapp/revanced/integrations/tiktok/feedfilter/FeedItemsFilter;->filter(Lcom/ss/android/ugc/aweme/feed/model/FeedItemList;)V", ) } ?: throw FeedApiServiceLIZFingerprint.exception SettingsStatusLoadFingerprint.result?.mutableMethod?.addInstruction( 0, - "invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableFeedFilter()V" + "invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableFeedFilter()V", ) ?: throw SettingsStatusLoadFingerprint.exception } } diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearModePatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch.kt similarity index 76% rename from src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearModePatch.kt rename to src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch.kt index 701ea2836b..60eb637c47 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch.kt @@ -9,7 +9,7 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage import app.revanced.patcher.patch.annotation.Patch import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints.OnClearDisplayEventFingerprint -import app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints.OnRenderFirstFrameFingerprint +import app.revanced.patches.tiktok.shared.fingerprints.OnRenderFirstFrameFingerprint import app.revanced.util.exception import app.revanced.util.indexOfFirstInstructionOrThrow import com.android.tools.smali.dexlib2.Opcode @@ -19,16 +19,16 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c name = "Remember clear display", description = "Remembers the clear display configurations in between videos.", compatiblePackages = [ - CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]), - CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"]) - ] + CompatiblePackage("com.ss.android.ugc.trill", ["36.5.4"]), + CompatiblePackage("com.zhiliaoapp.musically", ["36.5.4"]), + ], ) @Suppress("unused") object RememberClearDisplayPatch : BytecodePatch( setOf( OnClearDisplayEventFingerprint, - OnRenderFirstFrameFingerprint - ) + OnRenderFirstFrameFingerprint, + ), ) { override fun execute(context: BytecodeContext) { OnClearDisplayEventFingerprint.result?.mutableMethod?.let { @@ -40,7 +40,7 @@ object RememberClearDisplayPatch : BytecodePatch( it.addInstructions( isEnabledIndex, "invoke-static { v$isEnabledRegister }, " + - "Lapp/revanced/integrations/tiktok/cleardisplay/RememberClearDisplayPatch;->rememberClearDisplayState(Z)V" + "Lapp/revanced/integrations/tiktok/cleardisplay/RememberClearDisplayPatch;->rememberClearDisplayState(Z)V", ) // endregion @@ -54,22 +54,25 @@ object RememberClearDisplayPatch : BytecodePatch( """ # Create a new clearDisplayEvent and post it to the EventBus (https://github.com/greenrobot/EventBus) - # The state of clear display. - invoke-static { }, Lapp/revanced/integrations/tiktok/cleardisplay/RememberClearDisplayPatch;->getClearDisplayState()Z - move-result v3 - if-eqz v3, :clear_display_disabled - # Clear display type such as 0 = LONG_PRESS, 1 = SCREEN_RECORD etc. const/4 v1, 0x0 + # Enter method (Such as "pinch", "swipe_exit", or an empty string (unknown, what it means)). + const-string v2, "" + # Name of the clear display type which is equivalent to the clear display type. - const-string v2, "long_press" + const-string v3, "long_press" + + # The state of clear display. + invoke-static { }, Lapp/revanced/integrations/tiktok/cleardisplay/RememberClearDisplayPatch;->getClearDisplayState()Z + move-result v4 + if-eqz v4, :clear_display_disabled new-instance v0, $clearDisplayEventClass - invoke-direct { v0, v1, v2, v3 }, $clearDisplayEventClass->(ILjava/lang/String;Z)V + invoke-direct { v0, v1, v2, v3, v4 }, $clearDisplayEventClass->(ILjava/lang/String;Ljava/lang/String;Z)V invoke-virtual { v0 }, $clearDisplayEventClass->post()Lcom/ss/android/ugc/governance/eventbus/IEvent; """, - ExternalLabel("clear_display_disabled", getInstruction(0)) + ExternalLabel("clear_display_disabled", getInstruction(0)), ) } ?: throw OnRenderFirstFrameFingerprint.exception diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/fingerprints/OnRenderFirstFrameFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/fingerprints/OnRenderFirstFrameFingerprint.kt deleted file mode 100644 index d9e5a15ed0..0000000000 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/fingerprints/OnRenderFirstFrameFingerprint.kt +++ /dev/null @@ -1,9 +0,0 @@ -package app.revanced.patches.tiktok.interaction.cleardisplay.fingerprints - -import app.revanced.patcher.fingerprint.MethodFingerprint - -internal object OnRenderFirstFrameFingerprint : MethodFingerprint( - customFingerprint = { methodDef, _ -> - methodDef.definingClass.endsWith("/BaseListFragmentPanel;") && methodDef.name == "onRenderFirstFrame" - } -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch.kt index 7b0ece8b32..a4744f1dc7 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch.kt @@ -13,14 +13,13 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint2 import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint3 -import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPathParentFingerprint +import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadUriFingerprint import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch import app.revanced.patches.tiktok.misc.settings.SettingsPatch import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint import app.revanced.util.exception +import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstructionOrThrow -import com.android.tools.smali.dexlib2.Opcode -import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c import com.android.tools.smali.dexlib2.iface.reference.MethodReference @Patch( @@ -28,9 +27,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference description = "Removes download restrictions and changes the default path to download to.", dependencies = [IntegrationsPatch::class, SettingsPatch::class], compatiblePackages = [ - CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]), - CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"]) - ] + CompatiblePackage("com.ss.android.ugc.trill", ["36.5.4"]), + CompatiblePackage("com.zhiliaoapp.musically", ["36.5.4"]), + ], ) @Suppress("unused") object DownloadsPatch : BytecodePatch( @@ -38,9 +37,9 @@ object DownloadsPatch : BytecodePatch( ACLCommonShareFingerprint, ACLCommonShareFingerprint2, ACLCommonShareFingerprint3, - DownloadPathParentFingerprint, - SettingsStatusLoadFingerprint - ) + DownloadUriFingerprint, + SettingsStatusLoadFingerprint, + ), ) { override fun execute(context: BytecodeContext) { fun MethodFingerprint.getMethod() = result?.mutableMethod ?: throw exception @@ -52,7 +51,7 @@ object DownloadsPatch : BytecodePatch( """ const/4 v0, 0x0 return v0 - """ + """, ) }, ACLCommonShareFingerprint2 to { @@ -61,7 +60,7 @@ object DownloadsPatch : BytecodePatch( """ const/4 v0, 0x2 return v0 - """ + """, ) }, // Download videos without watermark. @@ -76,48 +75,40 @@ object DownloadsPatch : BytecodePatch( return v0 :noremovewatermark nop - """ + """, ) }, // Change the download path patch. - DownloadPathParentFingerprint to { - val targetIndex = indexOfFirstInstructionOrThrow { opcode == Opcode.INVOKE_STATIC } - val downloadUriMethod = context - .toMethodWalker(this) - .nextMethod(targetIndex, true) - .getMethod() as MutableMethod - - val firstIndex = downloadUriMethod.indexOfFirstInstructionOrThrow { - opcode == Opcode.INVOKE_DIRECT && ((this as Instruction35c).reference as MethodReference).name == "" + DownloadUriFingerprint to { + val firstIndex = indexOfFirstInstructionOrThrow { + getReference()?.name == "" } - val secondIndex = downloadUriMethod.indexOfFirstInstructionOrThrow { - opcode == Opcode.INVOKE_STATIC && ((this as Instruction35c).reference as MethodReference).returnType.contains( - "Uri" - ) + val secondIndex = indexOfFirstInstructionOrThrow { + getReference()?.returnType?.contains("Uri") == true } - downloadUriMethod.addInstructions( + addInstructions( secondIndex, """ - invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String; - move-result-object v0 - """ + invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String; + move-result-object v0 + """, ) - downloadUriMethod.addInstructions( + addInstructions( firstIndex, """ - invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String; - move-result-object v0 - """ + invoke-static {}, Lapp/revanced/integrations/tiktok/download/DownloadsPatch;->getDownloadPath()Ljava/lang/String; + move-result-object v0 + """, ) }, SettingsStatusLoadFingerprint to { addInstruction( 0, - "invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableDownload()V" + "invoke-static {}, Lapp/revanced/integrations/tiktok/settings/SettingsStatus;->enableDownload()V", ) - } + }, ).forEach { (fingerprint, patch) -> fingerprint.getMethod().patch() } diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadUriFingerprint.kt similarity index 50% rename from src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt rename to src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadUriFingerprint.kt index 53f41dc20d..edbf542c53 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadPathParentFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/fingerprints/DownloadUriFingerprint.kt @@ -3,22 +3,18 @@ package app.revanced.patches.tiktok.interaction.downloads.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.MethodFingerprint import com.android.tools.smali.dexlib2.AccessFlags -import com.android.tools.smali.dexlib2.Opcode -internal object DownloadPathParentFingerprint : MethodFingerprint( - "L", +internal object DownloadUriFingerprint : MethodFingerprint( + "Landroid/net/Uri;", AccessFlags.PUBLIC or AccessFlags.STATIC, strings = listOf( - "video/mp4" + "/", + "/Camera", + "/Camera/", + "video/mp4", ), parameters = listOf( - "L", - "L" + "Landroid/content/Context;", + "Ljava/lang/String;", ), - opcodes = listOf( - Opcode.CONST_STRING, - Opcode.INVOKE_STATIC, - Opcode.MOVE_RESULT_OBJECT, - Opcode.RETURN_OBJECT - ) -) \ No newline at end of file +) diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/PlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/PlaybackSpeedPatch.kt index 5a5f02f754..3d224c5856 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/PlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/PlaybackSpeedPatch.kt @@ -9,11 +9,13 @@ import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.annotation.CompatiblePackage import app.revanced.patcher.patch.annotation.Patch import app.revanced.patches.tiktok.interaction.speed.fingerprints.GetSpeedFingerprint -import app.revanced.patches.tiktok.interaction.speed.fingerprints.OnRenderFirstFrameFingerprint import app.revanced.patches.tiktok.interaction.speed.fingerprints.SetSpeedFingerprint +import app.revanced.patches.tiktok.shared.fingerprints.GetEnterFromFingerprint +import app.revanced.patches.tiktok.shared.fingerprints.OnRenderFirstFrameFingerprint import app.revanced.util.exception import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstructionOrThrow +import app.revanced.util.resultOrThrow import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction11x import com.android.tools.smali.dexlib2.iface.reference.MethodReference @@ -22,8 +24,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference description = "Enables the playback speed option for all videos and " + "retains the speed configurations in between videos.", compatiblePackages = [ - CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]), - CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"]), + CompatiblePackage("com.ss.android.ugc.trill", ["36.5.4"]), + CompatiblePackage("com.zhiliaoapp.musically", ["36.5.4"]), ], ) @Suppress("unused") @@ -32,6 +34,7 @@ object PlaybackSpeedPatch : BytecodePatch( GetSpeedFingerprint, OnRenderFirstFrameFingerprint, SetSpeedFingerprint, + GetEnterFromFingerprint, ), ) { override fun execute(context: BytecodeContext) { @@ -53,29 +56,29 @@ object PlaybackSpeedPatch : BytecodePatch( OnRenderFirstFrameFingerprint.result?.mutableMethod?.addInstructions( 0, """ - # Video playback location (e.g. home page, following page or search result page) retrieved using getEnterFrom method. - const/4 v0, 0x1 - invoke-virtual {p0, v0}, Lcom/ss/android/ugc/aweme/feed/panel/BaseListFragmentPanel;->getEnterFrom(Z)Ljava/lang/String; - move-result-object v0 - - # Model of current video retrieved using getCurrentAweme method. - invoke-virtual {p0}, Lcom/ss/android/ugc/aweme/feed/panel/BaseListFragmentPanel;->getCurrentAweme()Lcom/ss/android/ugc/aweme/feed/model/Aweme; - move-result-object v1 - - # Desired playback speed retrieved using getPlaybackSpeed method. - invoke-static {}, Lapp/revanced/integrations/tiktok/speed/PlaybackSpeedPatch;->getPlaybackSpeed()F - move-result v2 - invoke-static { v0, v1, v2 }, ${onVideoSwiped.method} - """, + # Video playback location (e.g. home page, following page or search result page) retrieved using getEnterFrom method. + const/4 v0, 0x1 + invoke-virtual {p0, v0}, ${GetEnterFromFingerprint.resultOrThrow().method} + move-result-object v0 + + # Model of current video retrieved using getCurrentAweme method. + invoke-virtual {p0}, Lcom/ss/android/ugc/aweme/feed/panel/BaseListFragmentPanel;->getCurrentAweme()Lcom/ss/android/ugc/aweme/feed/model/Aweme; + move-result-object v1 + + # Desired playback speed retrieved using getPlaybackSpeed method. + invoke-static {}, Lapp/revanced/integrations/tiktok/speed/PlaybackSpeedPatch;->getPlaybackSpeed()F + move-result v2 + invoke-static { v0, v1, v2 }, ${onVideoSwiped.method} + """, ) ?: throw OnRenderFirstFrameFingerprint.exception // Force enable the playback speed option for all videos. onVideoSwiped.mutableClass.methods.find { method -> method.returnType == "Z" }?.addInstructions( 0, """ - const/4 v0, 0x1 - return v0 - """, + const/4 v0, 0x1 + return v0 + """, ) ?: throw PatchException("Failed to force enable the playback speed option.") } ?: throw SetSpeedFingerprint.exception } diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/SettingsPatch.kt index 9dfdd86d21..28ab4ecaf4 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/SettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/SettingsPatch.kt @@ -24,8 +24,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference description = "Adds ReVanced settings to TikTok.", dependencies = [IntegrationsPatch::class], compatiblePackages = [ - CompatiblePackage("com.ss.android.ugc.trill", ["32.5.3"]), - CompatiblePackage("com.zhiliaoapp.musically", ["32.5.3"]), + CompatiblePackage("com.ss.android.ugc.trill", ["36.5.4"]), + CompatiblePackage("com.zhiliaoapp.musically", ["36.5.4"]), ], ) object SettingsPatch : BytecodePatch( diff --git a/src/main/kotlin/app/revanced/patches/tiktok/shared/fingerprints/GetEnterFromFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/shared/fingerprints/GetEnterFromFingerprint.kt new file mode 100644 index 0000000000..aa003dfc35 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/tiktok/shared/fingerprints/GetEnterFromFingerprint.kt @@ -0,0 +1,24 @@ +package app.revanced.patches.tiktok.shared.fingerprints + +import app.revanced.patcher.extensions.or +import app.revanced.patcher.fingerprint.MethodFingerprint +import com.android.tools.smali.dexlib2.AccessFlags +import com.android.tools.smali.dexlib2.Opcode + +internal object GetEnterFromFingerprint : MethodFingerprint( + returnType = "Ljava/lang/String;", + accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, + parameters = listOf("Z"), + opcodes = listOf( + Opcode.INVOKE_VIRTUAL, + Opcode.MOVE_RESULT, + Opcode.INVOKE_VIRTUAL, + Opcode.MOVE_RESULT_OBJECT, + Opcode.INVOKE_STATIC, + Opcode.MOVE_RESULT_OBJECT, + Opcode.RETURN_OBJECT, + ), + customFingerprint = { methodDef, _ -> + methodDef.definingClass.endsWith("/BaseListFragmentPanel;") + }, +) diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/fingerprints/OnRenderFirstFrameFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/shared/fingerprints/OnRenderFirstFrameFingerprint.kt similarity index 63% rename from src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/fingerprints/OnRenderFirstFrameFingerprint.kt rename to src/main/kotlin/app/revanced/patches/tiktok/shared/fingerprints/OnRenderFirstFrameFingerprint.kt index 59f930efea..6c796b15b7 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/fingerprints/OnRenderFirstFrameFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/shared/fingerprints/OnRenderFirstFrameFingerprint.kt @@ -1,9 +1,10 @@ -package app.revanced.patches.tiktok.interaction.speed.fingerprints +package app.revanced.patches.tiktok.shared.fingerprints import app.revanced.patcher.fingerprint.MethodFingerprint internal object OnRenderFirstFrameFingerprint : MethodFingerprint( + strings = listOf("method_enable_viewpager_preload_duration"), customFingerprint = { methodDef, _ -> - methodDef.definingClass.endsWith("/BaseListFragmentPanel;") && methodDef.name == "onRenderFirstFrame" - } + methodDef.definingClass.endsWith("/BaseListFragmentPanel;") + }, )