mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-07 10:57:08 +01:00
refactor(tiktok): simplify names (#1085)
This commit is contained in:
parent
886ac5c606
commit
9185c2efbc
@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class TiktokAdsCompatibility
|
||||
internal annotation class HideAdsCompatibility
|
@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility
|
||||
import app.revanced.patches.tiktok.ad.annotations.HideAdsCompatibility
|
||||
import app.revanced.patches.tiktok.ad.fingerprints.ConvertHelpFeedItemListFingerprint
|
||||
import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
@ -19,11 +19,11 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import org.jf.dexlib2.iface.reference.FieldReference
|
||||
|
||||
@Patch
|
||||
@Name("tiktok-ads")
|
||||
@Name("hide-ads")
|
||||
@Description("Removes ads from TikTok.")
|
||||
@TiktokAdsCompatibility
|
||||
@HideAdsCompatibility
|
||||
@Version("0.0.1")
|
||||
class TiktokAdsPatch : BytecodePatch(
|
||||
class HideAdsPatch : BytecodePatch(
|
||||
listOf(
|
||||
FeedItemListCloneFingerprint,
|
||||
ConvertHelpFeedItemListFingerprint
|
@ -12,19 +12,19 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility
|
||||
import app.revanced.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFingerprint
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class])
|
||||
@Name("tiktok-feed-filter")
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("feed-filter")
|
||||
@Description("Filters tiktok videos: removing ads, removing livestreams.")
|
||||
@FeedFilterCompatibility
|
||||
@Version("0.0.1")
|
||||
class TiktokFeedFilter : BytecodePatch(
|
||||
class FeedFilterPatch : BytecodePatch(
|
||||
listOf(
|
||||
FeedApiServiceLIZFingerprint,
|
||||
SettingsStatusLoadFingerprint
|
@ -21,17 +21,17 @@ import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonS
|
||||
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.misc.integrations.patch.TikTokIntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.reference.StringReference
|
||||
|
||||
@Patch
|
||||
@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class])
|
||||
@Name("tiktok-download")
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("downloads")
|
||||
@Description("Removes download restrictions and changes the default path to download to.")
|
||||
@DownloadsCompatibility
|
||||
@Version("0.0.1")
|
||||
|
@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class SeekbarCompatibility
|
||||
internal annotation class ShowSeekbarCompatibility
|
@ -10,18 +10,18 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.interaction.seekbar.annotations.SeekbarCompatibility
|
||||
import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility
|
||||
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.AwemeGetVideoControlFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction11n
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction22c
|
||||
|
||||
@Patch
|
||||
@Name("tiktok-seekbar")
|
||||
@Description("Show progress bar for all video.")
|
||||
@SeekbarCompatibility
|
||||
@Name("show-seekbar")
|
||||
@Description("Shows progress bar for all video.")
|
||||
@ShowSeekbarCompatibility
|
||||
@Version("0.0.1")
|
||||
class TiktokSeekbarPatch : BytecodePatch(
|
||||
class ShowSeekbarPatch : BytecodePatch(
|
||||
listOf(
|
||||
AwemeGetVideoControlFingerprint
|
||||
)
|
@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class SpeedCompatibility
|
||||
internal annotation class PlaybackSpeedCompatibility
|
@ -11,16 +11,16 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.tiktok.interaction.speed.annotations.SpeedCompatibility
|
||||
import app.revanced.patches.tiktok.interaction.speed.annotations.PlaybackSpeedCompatibility
|
||||
import app.revanced.patches.tiktok.interaction.speed.fingerprints.SpeedControlParentFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@Patch
|
||||
@Name("tiktok-speed")
|
||||
@Name("playback-speed")
|
||||
@Description("Enables the playback speed option for all videos.")
|
||||
@SpeedCompatibility
|
||||
@PlaybackSpeedCompatibility
|
||||
@Version("0.0.1")
|
||||
class SpeedPatch : BytecodePatch(
|
||||
class PlaybackSpeedPatch : BytecodePatch(
|
||||
listOf(
|
||||
SpeedControlParentFingerprint
|
||||
)
|
@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class TikTokIntegrationsCompatibility
|
||||
internal annotation class IntegrationsCompatibility
|
@ -1,13 +1,13 @@
|
||||
package app.revanced.patches.tiktok.misc.integrations.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility
|
||||
import app.revanced.patches.tiktok.misc.integrations.annotations.IntegrationsCompatibility
|
||||
import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint
|
||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch
|
||||
|
||||
@Name("tiktok-integrations")
|
||||
@TikTokIntegrationsCompatibility
|
||||
class TikTokIntegrationsPatch : AbstractIntegrationsPatch(
|
||||
@Name("integrations")
|
||||
@IntegrationsCompatibility
|
||||
class IntegrationsPatch : AbstractIntegrationsPatch(
|
||||
"Lapp/revanced/tiktok/utils/ReVancedUtils;",
|
||||
listOf(InitFingerprint)
|
||||
)
|
@ -0,0 +1,14 @@
|
||||
package app.revanced.patches.tiktok.misc.login.disablerequirement.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class DisableLoginRequirementCompatibility
|
@ -1,7 +1,6 @@
|
||||
package app.revanced.patches.tiktok.misc.forcelogin.fingerprints
|
||||
package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object MandatoryLoginServiceFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
@ -1,12 +1,12 @@
|
||||
package app.revanced.patches.tiktok.misc.forcelogin.fingerprints
|
||||
package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility
|
||||
import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility
|
||||
|
||||
@Name("mandatory-login-service-fingerprint2")
|
||||
@DisableForceLoginCompatibility
|
||||
@DisableLoginRequirementCompatibility
|
||||
@Version("0.0.1")
|
||||
object MandatoryLoginServiceFingerprint2 : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.tiktok.misc.forcelogin.patch
|
||||
package app.revanced.patches.tiktok.misc.login.disablerequirement.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
@ -9,16 +9,16 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility
|
||||
import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint
|
||||
import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint2
|
||||
import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility
|
||||
import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint
|
||||
import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint2
|
||||
|
||||
@Patch
|
||||
@Name("tiktok-force-login")
|
||||
@Name("disable-login-requirement")
|
||||
@Description("Do not force login.")
|
||||
@DisableForceLoginCompatibility
|
||||
@DisableLoginRequirementCompatibility
|
||||
@Version("0.0.1")
|
||||
class DisableForceLoginPatch : BytecodePatch(
|
||||
class DisableLoginRequirementPatch : BytecodePatch(
|
||||
listOf(
|
||||
MandatoryLoginServiceFingerprint,
|
||||
MandatoryLoginServiceFingerprint2
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.tiktok.misc.forcelogin.annotations
|
||||
package app.revanced.patches.tiktok.misc.login.fixgoogle.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class DisableForceLoginCompatibility
|
||||
internal annotation class FixGoogleLoginCompatibility
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.tiktok.misc.loginfallback.fingerprints
|
||||
package app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.tiktok.misc.loginfallback.fingerprints
|
||||
package app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
@ -1,4 +1,4 @@
|
||||
package app.revanced.patches.tiktok.misc.loginfallback.patch
|
||||
package app.revanced.patches.tiktok.misc.login.fixgoogle.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
@ -9,16 +9,16 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.misc.loginfallback.annotations.TikTokWebLoginCompatibility
|
||||
import app.revanced.patches.tiktok.misc.loginfallback.fingerprints.GoogleAuthAvailableFingerprint
|
||||
import app.revanced.patches.tiktok.misc.loginfallback.fingerprints.GoogleOneTapAuthAvailableFingerprint
|
||||
import app.revanced.patches.tiktok.misc.login.fixgoogle.annotations.FixGoogleLoginCompatibility
|
||||
import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleAuthAvailableFingerprint
|
||||
import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleOneTapAuthAvailableFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("tiktok-web-login")
|
||||
@Name("fix-google-login")
|
||||
@Description("Allows logging in with a Google account.")
|
||||
@TikTokWebLoginCompatibility
|
||||
@FixGoogleLoginCompatibility
|
||||
@Version("0.0.1")
|
||||
class TikTokLoginFallbackPatch : BytecodePatch(
|
||||
class FixGoogleLoginPatch : BytecodePatch(
|
||||
listOf(
|
||||
GoogleOneTapAuthAvailableFingerprint,
|
||||
GoogleAuthAvailableFingerprint
|
@ -1,14 +0,0 @@
|
||||
package app.revanced.patches.tiktok.misc.loginfallback.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class TikTokWebLoginCompatibility
|
@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class TikTokSettingsCompatibility
|
||||
internal annotation class SettingsCompatibility
|
@ -13,8 +13,8 @@ import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.annotations.SettingsCompatibility
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.AboutOnClickMethodFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityOnCreateFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsOnViewCreatedFingerprint
|
||||
@ -27,12 +27,12 @@ import org.jf.dexlib2.iface.reference.StringReference
|
||||
import org.jf.dexlib2.iface.reference.TypeReference
|
||||
|
||||
@Patch
|
||||
@DependsOn([TikTokIntegrationsPatch::class])
|
||||
@Name("tiktok-settings")
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
@Name("settings")
|
||||
@Description("Adds settings for ReVanced to TikTok.")
|
||||
@TikTokSettingsCompatibility
|
||||
@SettingsCompatibility
|
||||
@Version("0.0.1")
|
||||
class TikTokSettingsPatch : BytecodePatch(
|
||||
class SettingsPatch : BytecodePatch(
|
||||
listOf(
|
||||
AdPersonalizationActivityOnCreateFingerprint,
|
||||
SettingsOnViewCreatedFingerprint,
|
@ -14,9 +14,9 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
|
||||
import app.revanced.patches.tiktok.misc.spoof.sim.annotations.SpoofSimCompatibility
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -24,7 +24,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import org.jf.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch(false)
|
||||
@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class])
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("sim-spoof")
|
||||
@Description("Spoofs the information which is retrieved from the sim-card.")
|
||||
@SpoofSimCompatibility
|
||||
|
Loading…
Reference in New Issue
Block a user