From 545fc62b7908f2af84c09463bc67e6070defed59 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 28 Jan 2026 15:02:00 +0100 Subject: [PATCH] use properties without space until android minsdk 29 --- .../exportall/ExportAllActivitiesPatch.kt | 8 ++++---- .../patches/all/misc/adb/HideAdbPatch.kt | 20 +++++++++---------- .../all/misc/appicon/HideAppIconPatch.kt | 8 ++++---- .../all/misc/build/SpoofBuildInfoPatch.kt | 7 ++++--- .../location/hide/HideMockLocationPatch.kt | 7 ++++--- .../sim/spoof/SpoofSimCountryPatch.kt | 6 +++--- .../sim/spoof/SpoofSimProviderPatch.kt | 7 ++++--- .../connectivity/wifi/spoof/SpoofWifiPatch.kt | 7 ++++--- .../CustomCertificatesPatch.kt | 7 ++++--- .../debugging/EnableAndroidDebuggingPatch.kt | 7 ++++--- ...xportInternalDataDocumentsProviderPatch.kt | 7 ++++--- .../revanced/patches/all/misc/hex/HexPatch.kt | 4 ++-- .../gestures/PredictiveBackGesturePatch.kt | 7 ++++--- .../OverrideCertificatePinningPatch.kt | 11 +++++----- .../packagename/ChangePackageNamePatch.kt | 3 ++- .../playintegrity/DisablePlayIntegrity.kt | 7 ++++--- .../RemoveScreenCaptureRestrictionPatch.kt | 7 ++++--- .../RemoveScreenshotRestrictionPatch.kt | 7 ++++--- .../sharetargets/RemoveShareTargetsPatch.kt | 7 ++++--- .../misc/spoof/EnableRomSignatureSpoofing.kt | 7 ++++--- .../misc/targetSdk/SetTargetSdkVersion34.kt | 7 ++++--- .../versioncode/ChangeVersionCodePatch.kt | 7 ++++--- .../patches/amazon/DeepLinkingPatch.kt | 7 ++++--- .../patches/angulus/ads/RemoveAdsPatch.kt | 10 +++++----- .../limitations/RemovePlayLimitsPatch.kt | 7 ++++--- .../root/BypassRootChecksPatch.kt | 7 ++++--- .../com/sbs/ondemand/tv/RemoveAdsPatch.kt | 11 +++++----- .../patches/cricbuzz/ads/DisableAdsPatch.kt | 6 +++--- .../patches/crunchyroll/ads/HideAdsPatch.kt | 6 +++--- .../patches/disneyplus/SkipAdsPatch.kt | 7 ++++--- .../patches/duolingo/ad/DisableAdsPatch.kt | 6 +++--- .../duolingo/debug/EnableDebugMenuPatch.kt | 7 ++++--- .../energy/SkipEnergyRechargeAdsPatch.kt | 7 ++++--- .../ads/mainfeed/HideSponsoredStoriesPatch.kt | 6 +++--- .../facebook/ads/story/HideStoryAdsPatch.kt | 7 ++++--- .../bootloader/BootloaderDetectionPatch.kt | 7 ++++--- .../detection/root/RootDetectionPatch.kt | 7 ++++--- .../customtabs/EnableCustomTabsPatch.kt | 7 ++++--- .../EnableDCIMFoldersBackupControlPatch.kt | 7 ++++--- .../misc/features/SpoofFeaturesPatch.kt | 7 ++++--- .../restrictions/RemoveDeviceRestrictions.kt | 7 ++++--- .../patches/hexeditor/ad/DisableAdsPatch.kt | 6 +++--- .../iconpackstudio/misc/pro/UnlockProPatch.kt | 6 +++--- .../RemoveDeviceIntegrityChecksPatch.kt | 7 ++++--- .../detection/root/RootDetectionPatch.kt | 10 +++++----- .../signature/SpoofSignaturePatch.kt | 7 ++++--- .../patches/inshorts/ad/InshortsAdsPatch.kt | 6 +++--- .../patches/instagram/ads/HideAdsPatch.kt | 6 +++--- .../feed/LimitFeedToFollowedProfiles.kt | 7 ++++--- .../ghost/story/AnonymousStoryViewingPatch.kt | 7 ++++--- .../instagram/hide/explore/HideExploreFeed.kt | 7 ++++--- .../hide/navigation/HideNavigationButtons.kt | 7 ++++--- .../instagram/hide/stories/HideStories.kt | 7 ++++--- .../hide/suggestions/HideSuggestedContent.kt | 7 ++++--- .../misc/devmenu/EnableDeveloperMenuPatch.kt | 7 ++++--- .../misc/links/OpenLinksExternallyPatch.kt | 7 ++++--- .../domain/ChangeLinkSharingDomainPatch.kt | 7 ++++--- .../privacy/SanitizeSharingLinksPatch.kt | 9 +++++---- .../misc/signature/SignatureCheckPatch.kt | 7 ++++--- .../reels/DisableReelsScrollingPatch.kt | 7 ++++--- .../flipping/DisableStoryAutoFlippingPatch.kt | 7 ++++--- .../patches/irplus/ad/RemoveAdsPatch.kt | 6 +++--- .../patches/letterboxd/ads/HideAdsPatch.kt | 6 +++--- .../unlockAppIcons/UnlockAppIconsPatch.kt | 6 +++--- .../misc/login/DisableMandatoryLoginPatch.kt | 6 +++--- .../misc/premium/UnlockPremiumPatch.kt | 6 +++--- .../misc/pro/UnlockProVersionPatch.kt | 6 +++--- .../messenger/inbox/HideInboxAdsPatch.kt | 7 ++++--- .../messenger/inbox/HideInboxSubtabsPatch.kt | 7 ++++--- .../layout/HideFacebookButtonPatch.kt | 7 ++++--- .../messenger/metaai/RemoveMetaAIPatch.kt | 7 ++++--- .../misc/locale/ForceEnglishLocalePatch.kt | 11 +++++----- .../mifitness/misc/login/FixLoginPatch.kt | 5 +++-- .../patches/music/ad/video/HideVideoAds.kt | 7 ++++--- .../EnableExclusiveAudioPlayback.kt | 7 ++++--- .../permanentrepeat/PermanentRepeatPatch.kt | 7 ++++--- .../music/layout/buttons/HideButtons.kt | 7 ++++--- .../layout/compactheader/HideCategoryBar.kt | 7 ++++--- .../miniplayercolor/ChangeMiniplayerColor.kt | 7 ++++--- .../navigationbar/NavigationBarPatch.kt | 7 ++++--- .../layout/premium/HideGetPremiumPatch.kt | 7 ++++--- .../BypassCertificateChecksPatch.kt | 7 ++++--- .../BackgroundPlaybackPatch.kt | 7 ++++--- .../myexpenses/misc/pro/UnlockProPatch.kt | 6 +++--- .../patches/myfitnesspal/ads/HideAdsPatch.kt | 9 +++++---- .../RemoveBroadcastsRestrictionPatch.kt | 7 ++++--- .../revanced/patches/nunl/ads/HideAdsPatch.kt | 5 +++-- .../nunl/firebase/SpoofCertificatePatch.kt | 7 ++++--- .../misc/fix/crash/FixCrashPatch.kt | 7 ++++--- .../root/RemoveRootDetectionPatch.kt | 9 +++++---- .../pandora/ads/DisableAudioAdsPatch.kt | 6 +++--- .../pandora/misc/EnableUnlimitedSkipsPatch.kt | 6 +++--- .../patches/peacocktv/ads/HideAdsPatch.kt | 9 +++++---- .../detection/deviceid/SpoofDeviceIdPatch.kt | 7 ++++--- .../misc/annoyances/HideUpdatePopupPatch.kt | 7 ++++--- .../misc/unlock/plus/UnlockPlusPatch.kt | 6 +++--- .../misc/SpoofAndroidDeviceIdPatch.kt | 7 ++++--- .../tracking/DisableTrackingPatch.kt | 10 +++++----- .../patches/pixiv/ads/HideAdsPatch.kt | 6 +++--- .../patches/primevideo/ads/SkipAdsPatch.kt | 11 +++++----- .../permissions/RenamePermissionsPatch.kt | 7 ++++--- .../video/speed/PlaybackSpeedPatch.kt | 9 +++++---- .../account/RemoveFreeAccountsLimitPatch.kt | 9 +++++---- .../signature/RemoveSentFromSignaturePatch.kt | 7 ++++--- .../protonvpn/delay/RemoveDelayPatch.kt | 9 +++++---- .../splittunneling/UnlockSplitTunneling.kt | 6 +++--- .../HidePurchaseReminderPatch.kt | 9 +++++---- .../patches/reddit/ad/general/HideAdsPatch.kt | 8 ++++---- .../boostforreddit/ads/DisableAdsPatch.kt | 6 +++--- .../FixAudioMissingInDownloadsPatch.kt | 7 ++++--- .../subscription/UnlockSubscriptionPatch.kt | 9 +++++---- .../joeyforreddit/ads/DisableAdsPatch.kt | 6 +++--- .../DisableSyncForLemmyBottomSheetPatch.kt | 7 ++++--- .../fix/thumbnail/FixPostThumbnailsPatch.kt | 11 +++++----- .../fix/video/FixVideoDownloadsPatch.kt | 7 ++++--- .../DisableScreenshotPopupPatch.kt | 7 ++++--- .../premiumicon/UnlockPremiumIconPatch.kt | 7 ++++--- .../tracking/url/SanitizeUrlQueryPatch.kt | 9 +++++---- .../radio/misc/fix/crash/FixCrashPatch.kt | 11 +++++----- .../device/BypassDeviceChecksPatch.kt | 14 ++++++------- .../detection/root/RootDetectionPatch.kt | 7 ++++--- .../shared/misc/gms/GmsCoreSupportPatch.kt | 6 +++--- .../license/DisableLicenseCheckPatch.kt | 7 ++++--- .../misc/privacy/DisableSentryTelemetry.kt | 7 ++++--- .../filesize/RemoveFileSizeLimitPatch.kt | 7 ++++--- .../patches/songpal/badge/BadgeTabPatch.kt | 7 ++++--- .../badge/RemoveNotificationBadgePatch.kt | 7 ++++--- .../patches/soundcloud/ad/HideAdsPatch.kt | 6 +++--- .../analytics/DisableTelemetryPatch.kt | 7 ++++--- .../offlinesync/EnableOfflineSyncPatch.kt | 6 +++--- .../misc/fix/login/FixFacebookLoginPatch.kt | 9 +++++---- .../misc/lyrics/ChangeLyricsProviderPatch.kt | 9 +++++---- .../misc/privacy/SanitizeSharingLinksPatch.kt | 7 ++++--- .../widgets/FixThirdPartyLaunchersWidgets.kt | 7 ++++--- .../stocard/layout/HideOffersTabPatch.kt | 6 +++--- .../stocard/layout/HideStoryBubblesPatch.kt | 6 +++--- .../OverwriteMediaUploadParametersPatch.kt | 7 ++++--- .../password/EnablePasswordLoginPatch.kt | 7 ++++--- .../privacy/BlockSnowplowTrackingPatch.kt | 7 ++++--- .../strava/quickedit/DisableQuickEditPatch.kt | 7 ++++--- .../subscription/UnlockSubscriptionPatch.kt | 7 ++++--- .../DisableSubscriptionSuggestionsPatch.kt | 6 +++--- .../RemoveGooglePlayIntegrityCheckPatch.kt | 7 ++++--- .../revanced/patches/threads/HideAdsPatch.kt | 6 +++--- .../misc/themeunlock/UnlockThemePatch.kt | 7 ++++--- .../tiktok/feedfilter/FeedFilterPatch.kt | 7 ++++--- .../cleardisplay/RememberClearDisplayPatch.kt | 7 ++++--- .../interaction/downloads/DownloadsPatch.kt | 4 ++-- .../interaction/seekbar/ShowSeekbarPatch.kt | 7 ++++--- .../interaction/speed/PlaybackSpeedPatch.kt | 7 ++++--- .../DisableLoginRequirementPatch.kt | 6 +++--- .../login/fixgoogle/FixGoogleLoginPatch.kt | 7 ++++--- .../tiktok/misc/settings/SettingsPatch.kt | 4 ++-- .../misc/share/SanitizeShareUrlsPatch.kt | 7 ++++--- .../tiktok/misc/spoof/sim/SpoofSimPatch.kt | 7 ++++--- .../revanced/patches/trakt/UnlockProPatch.kt | 6 +++--- .../lockscreen/ShowOnLockscreenPatch.kt | 7 ++++--- .../patches/tumblr/ads/DisableDashboardAds.kt | 7 ++++--- .../adfree/DisableAdFreeBannerPatch.kt | 7 ++++--- .../inappupdate/DisableInAppUpdatePatch.kt | 7 ++++--- .../DisableBlogNotificationReminderPatch.kt | 7 ++++--- .../popups/DisableGiftMessagePopupPatch.kt | 7 ++++--- .../annoyances/tv/DisableTumblrTvPatch.kt | 7 ++++--- .../tumblr/fixes/FixOldVersionsPatch.kt | 7 ++++--- .../patches/twitch/ad/audio/AudioAdsPatch.kt | 7 ++++--- .../twitch/ad/embedded/EmbeddedAdsPatch.kt | 11 +++++----- .../patches/twitch/ad/video/VideoAdsPatch.kt | 5 +++-- .../antidelete/ShowDeletedMessagesPatch.kt | 7 ++++--- .../autoclaim/AutoClaimChannelPointsPatch.kt | 7 ++++--- .../patches/twitch/debug/DebugModePatch.kt | 5 +++-- .../twitch/misc/settings/SettingsPatch.kt | 4 ++-- .../downloads/UnlockDownloadsPatch.kt | 7 ++++--- .../layout/viewcount/HideViewCountPatch.kt | 7 ++++--- .../misc/dynamiccolor/DynamicColorPatch.kt | 7 ++++--- .../links/ChangeLinkSharingDomainPatch.kt | 7 ++++--- .../misc/links/SanitizeSharingLinksPatch.kt | 7 ++++--- .../patches/viber/ads/HideAdsPatch.kt | 7 ++++--- .../misc/navbar/HideNavigationButtons.kt | 7 ++++--- .../misc/promocode/PromoCodeUnlockPatch.kt | 7 ++++--- .../patches/willhaben/ads/HideAdsPatch.kt | 7 ++++--- .../youtube/ad/general/HideAdsPatch.kt | 7 ++++--- .../patches/youtube/ad/video/VideoAdsPatch.kt | 5 +++-- .../copyvideourl/CopyVideoUrlPatch.kt | 7 ++++--- .../RemoveViewerDiscretionDialogPatch.kt | 7 ++++--- .../DisableChapterSkipDoubleTapPatch.kt | 7 ++++--- .../interaction/downloads/DownloadsPatch.kt | 4 ++-- .../interaction/seekbar/SeekbarPatch.kt | 14 ++++++------- .../swipecontrols/SwipeControlsPatch.kt | 7 ++++--- .../layout/autocaptions/AutoCaptionsPatch.kt | 7 ++++--- .../branding/header/ChangeHeaderPatch.kt | 7 ++++--- .../layout/buttons/action/HideButtonsPatch.kt | 7 ++++--- .../navigation/NavigationButtonsPatch.kt | 5 +++-- .../overlay/HidePlayerOverlayButtonsPatch.kt | 5 +++-- .../formfactor/ChangeFormFactorPatch.kt | 11 +++++----- .../endscreencards/HideEndScreenCardsPatch.kt | 7 ++++--- .../HideEndScreenSuggestedVideoPatch.kt | 7 ++++--- .../DisableFullscreenAmbientModePatch.kt | 7 ++++--- .../hide/general/HideLayoutComponentsPatch.kt | 7 ++++--- .../hide/infocards/HideInfoCardsPatch.kt | 7 ++++--- .../HidePlayerFlyoutMenuPatch.kt | 7 ++++--- .../HideRelatedVideoOverlayPatch.kt | 7 ++++--- .../DisableRollingNumberAnimationPatch.kt | 7 ++++--- .../hide/shorts/HideShortsComponentsPatch.kt | 7 ++++--- .../DisableSignInToTvPatchPopup.kt | 7 ++++--- .../layout/hide/time/HideTimestampPatch.kt | 7 ++++--- .../layout/miniplayer/MiniplayerPatch.kt | 4 ++-- .../panels/popup/PlayerPopupPanelsPatch.kt | 7 ++++--- .../player/fullscreen/ExitFullscreenPatch.kt | 7 ++++--- .../OpenVideosFullscreenHookPatch.kt | 5 +++-- .../fullscreen/OpenVideosFullscreenPatch.kt | 7 ++++--- .../CustomPlayerOverlayOpacityPatch.kt | 7 ++++--- .../ReturnYouTubeDislikePatch.kt | 5 +++-- .../layout/searchbar/WideSearchbarPatch.kt | 7 ++++--- .../shortsautoplay/ShortsAutoplayPatch.kt | 15 +++++++------- .../OpenShortsInRegularPlayerPatch.kt | 7 ++++--- .../layout/sponsorblock/SponsorBlockPatch.kt | 4 ++-- .../spoofappversion/SpoofAppVersionPatch.kt | 5 +++-- .../layout/startpage/ChangeStartPagePatch.kt | 7 ++++--- .../DisableResumingShortsOnStartupPatch.kt | 11 +++++----- .../thumbnails/AlternativeThumbnailsPatch.kt | 7 ++++--- .../BypassImageRegionRestrictionsPatch.kt | 7 ++++--- .../misc/announcements/AnnouncementsPatch.kt | 6 +++--- .../BackgroundPlaybackPatch.kt | 7 ++++--- .../spoof/SpoofDeviceDimensionsPatch.kt | 7 ++++--- ...ckWatchHistoryDomainNameResolutionPatch.kt | 6 +++--- .../youtube/misc/gms/GmsCoreSupportPatch.kt | 4 ++-- .../DisableHapticFeedbackPatch.kt | 7 ++++--- .../misc/links/BypassURLRedirectsPatch.kt | 7 ++++--- .../misc/links/OpenLinksExternallyPatch.kt | 7 ++++--- .../youtube/misc/loopvideo/LoopVideoPatch.kt | 5 +++-- .../misc/spoof/SpoofVideoStreamsPatch.kt | 12 +++++------ .../video/audio/ForceOriginalAudioPatch.kt | 4 ++-- .../video/codecs/DisableVideoCodecsPatch.kt | 7 ++++--- .../video/quality/VideoQualityPatch.kt | 7 ++++--- 234 files changed, 922 insertions(+), 741 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/activity/exportall/ExportAllActivitiesPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/activity/exportall/ExportAllActivitiesPatch.kt index 29682bb15..8336cebdb 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/activity/exportall/ExportAllActivitiesPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/activity/exportall/ExportAllActivitiesPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.all.misc.activity.exportall -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch - -@Suppress("unused", "ObjectPropertyName") -val `Export all activities` by creatingResourcePatch( +@Suppress("unused") +val exportAllActivitiesPatch = resourcePatch( + name = "Export all activities", description = "Makes all app activities exportable.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/adb/HideAdbPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/adb/HideAdbPatch.kt index 28b5274fc..e21d8e959 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/adb/HideAdbPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/adb/HideAdbPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.all.misc.adb import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.transformation.transformInstructionsPatch import app.revanced.util.getReference import com.android.tools.smali.dexlib2.Opcode @@ -16,29 +16,29 @@ private val SETTINGS_GLOBAL_GET_INT_OR_THROW_METHOD_REFERENCE = ImmutableMethodR "Landroid/provider/Settings\$Global;", "getInt", listOf("Landroid/content/ContentResolver;", "Ljava/lang/String;"), - "I" + "I", ) private val SETTINGS_GLOBAL_GET_INT_OR_DEFAULT_METHOD_REFERENCE = ImmutableMethodReference( "Landroid/provider/Settings\$Global;", "getInt", listOf("Landroid/content/ContentResolver;", "Ljava/lang/String;", "I"), - "I" + "I", ) private val getIntMethodReferences = listOf( SETTINGS_GLOBAL_GET_INT_OR_THROW_METHOD_REFERENCE, - SETTINGS_GLOBAL_GET_INT_OR_DEFAULT_METHOD_REFERENCE + SETTINGS_GLOBAL_GET_INT_OR_DEFAULT_METHOD_REFERENCE, ) -@Suppress("unused", "ObjectPropertyName") -val `Hide ADB status` by creatingBytecodePatch( +@Suppress("unused") +val hideADBStatusPatch = bytecodePatch( + name = "Hide ADB status", description = "Hides enabled development settings and/or ADB.", use = false, ) { extendWith("extensions/all/misc/adb/hide-adb.rve") - dependsOn( transformInstructionsPatch( filterMap = filterMap@{ classDef, method, instruction, instructionIndex -> @@ -63,9 +63,9 @@ val `Hide ADB status` by creatingBytecodePatch( method.replaceInstruction( index, - "invoke-static { $registerString }, $EXTENSION_CLASS_DESCRIPTOR->getInt($parameterString)I" + "invoke-static { $registerString }, $EXTENSION_CLASS_DESCRIPTOR->getInt($parameterString)I", ) - } - ) + }, + ), ) } diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt index d1800a7ad..8e0faa604 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt @@ -1,13 +1,14 @@ package app.revanced.patches.all.misc.appicon -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.asSequence import app.revanced.util.childElementsSequence import org.w3c.dom.Element import java.util.logging.Logger -@Suppress("unused", "ObjectPropertyName") -val `Hide app icon` by creatingResourcePatch( +@Suppress("unused") +val hideAppIconPatch = resourcePatch( + name = "Hide app icon", description = "Hides the app icon from the Android launcher.", use = false, ) { @@ -45,4 +46,3 @@ val `Hide app icon` by creatingResourcePatch( } } } - diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/build/SpoofBuildInfoPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/build/SpoofBuildInfoPatch.kt index 056a57511..9e6e72369 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/build/SpoofBuildInfoPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/build/SpoofBuildInfoPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.all.misc.build -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.longOption import app.revanced.patcher.patch.stringOption -@Suppress("unused", "ObjectPropertyName") -val `Spoof build info` by creatingBytecodePatch( +@Suppress("unused") +val spoofBuildInfoPatch = bytecodePatch( + name = "Spoof build info", description = "Spoofs the information about the current build.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/location/hide/HideMockLocationPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/location/hide/HideMockLocationPatch.kt index ec0d44d8e..8c69bfad0 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/location/hide/HideMockLocationPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/location/hide/HideMockLocationPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.all.misc.connectivity.location.hide import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.transformation.IMethodCall import app.revanced.patches.all.misc.transformation.fromMethodReference import app.revanced.patches.all.misc.transformation.transformInstructionsPatch @@ -9,8 +9,9 @@ import app.revanced.util.getReference import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction import com.android.tools.smali.dexlib2.iface.reference.MethodReference -@Suppress("unused", "ObjectPropertyName") -val `Hide mock location` by creatingBytecodePatch( +@Suppress("unused") +val hideMockLocationPatch = bytecodePatch( + name = "Hide mock location", description = "Prevents the app from knowing the device location is being mocked by a third party app.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/telephony/sim/spoof/SpoofSimCountryPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/telephony/sim/spoof/SpoofSimCountryPatch.kt index 42149cc37..432b52b95 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/telephony/sim/spoof/SpoofSimCountryPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/telephony/sim/spoof/SpoofSimCountryPatch.kt @@ -2,8 +2,8 @@ package app.revanced.patches.all.misc.connectivity.telephony.sim.spoof import app.revanced.patcher.patch.bytecodePatch -@Deprecated("Patch was renamed", ReplaceWith("`Spoof SIM provider`")) +@Deprecated("Patch was renamed", ReplaceWith("SpoofSIMProviderPatch")) @Suppress("unused") val spoofSimCountryPatch = bytecodePatch { - dependsOn(`Spoof SIM provider`) -} \ No newline at end of file + dependsOn(spoofSIMProviderPatch) +} diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/telephony/sim/spoof/SpoofSimProviderPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/telephony/sim/spoof/SpoofSimProviderPatch.kt index 27274810f..4f60d88d3 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/telephony/sim/spoof/SpoofSimProviderPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/telephony/sim/spoof/SpoofSimProviderPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.all.misc.connectivity.telephony.sim.spoof import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.intOption import app.revanced.patcher.patch.stringOption import app.revanced.patches.all.misc.transformation.transformInstructionsPatch @@ -14,8 +14,9 @@ import com.android.tools.smali.dexlib2.mutable.MutableMethod import com.android.tools.smali.dexlib2.util.MethodUtil import java.util.* -@Suppress("unused", "ObjectPropertyName") -val `Spoof SIM provider` by creatingBytecodePatch( +@Suppress("unused") +val spoofSIMProviderPatch = bytecodePatch( + name = "Spoof SIM provider", description = "Spoofs information about the SIM card provider.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/wifi/spoof/SpoofWifiPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/wifi/spoof/SpoofWifiPatch.kt index 4a8e939bf..1666a27a8 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/wifi/spoof/SpoofWifiPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/connectivity/wifi/spoof/SpoofWifiPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.all.misc.connectivity.wifi.spoof -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.transformation.IMethodCall import app.revanced.patches.all.misc.transformation.filterMapInstruction35c import app.revanced.patches.all.misc.transformation.transformInstructionsPatch @@ -10,8 +10,9 @@ private const val EXTENSION_CLASS_DESCRIPTOR_PREFIX = private const val EXTENSION_CLASS_DESCRIPTOR = "$EXTENSION_CLASS_DESCRIPTOR_PREFIX;" -@Suppress("unused", "ObjectPropertyName") -val `Spoof Wi-Fi connection` by creatingBytecodePatch( +@Suppress("unused") +val spoofWiFiConnectionPatch = bytecodePatch( + name = "Spoof Wi-Fi connection", description = "Spoofs an existing Wi-Fi connection.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/customcertificates/CustomCertificatesPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/customcertificates/CustomCertificatesPatch.kt index d7230cb70..661ee306b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/customcertificates/CustomCertificatesPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/customcertificates/CustomCertificatesPatch.kt @@ -2,15 +2,16 @@ package app.revanced.patches.all.misc.customcertificates import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.booleanOption -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.patcher.patch.stringsOption import app.revanced.util.Utils.trimIndentMultiline import app.revanced.util.getNode import org.w3c.dom.Element import java.io.File -@Suppress("unused", "ObjectPropertyName") -val `Custom network security` by creatingResourcePatch( +@Suppress("unused") +val customNetworkSecurityPatch = resourcePatch( + name = "Custom network security", description = "Allows trusting custom certificate authorities for a specific domain.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/debugging/EnableAndroidDebuggingPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/debugging/EnableAndroidDebuggingPatch.kt index a0c2e94bb..86e981a63 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/debugging/EnableAndroidDebuggingPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/debugging/EnableAndroidDebuggingPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.all.misc.debugging -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import org.w3c.dom.Element -@Suppress("unused", "ObjectPropertyName") -val `Enable Android debugging` by creatingResourcePatch( +@Suppress("unused") +val enableAndroidDebuggingPatch = resourcePatch( + name = "Enable Android debugging", description = "Enables Android debugging capabilities. This can slow down the app.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/directory/documentsprovider/ExportInternalDataDocumentsProviderPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/directory/documentsprovider/ExportInternalDataDocumentsProviderPatch.kt index d669539b6..46fd56dae 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/directory/documentsprovider/ExportInternalDataDocumentsProviderPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/directory/documentsprovider/ExportInternalDataDocumentsProviderPatch.kt @@ -1,12 +1,13 @@ package app.revanced.patches.all.misc.directory.documentsprovider import app.revanced.patcher.patch.bytecodePatch -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.asSequence import app.revanced.util.getNode -@Suppress("unused", "ObjectPropertyName") -val `Export internal data documents provider` by creatingResourcePatch( +@Suppress("unused") +val exportInternalDataDocumentsProviderPatch = resourcePatch( + name = "Export internal data documents provider", description = "Exports a documents provider that grants access to the internal data directory of this app " + "to file managers and other apps that support the Storage Access Framework.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/hex/HexPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/hex/HexPatch.kt index 581685d10..9c58b33ab 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/hex/HexPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/hex/HexPatch.kt @@ -1,14 +1,14 @@ package app.revanced.patches.all.misc.hex import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.creatingRawResourcePatch +import app.revanced.patcher.patch.rawResourcePatch import app.revanced.patcher.patch.stringsOption import app.revanced.patches.shared.misc.hex.HexPatchBuilder import app.revanced.patches.shared.misc.hex.hexPatch import app.revanced.util.Utils.trimIndentMultiline @Suppress("unused") -val Hex by creatingRawResourcePatch( +val Hex = rawResourcePatch( description = "Replaces a hexadecimal patterns of bytes of files in an APK.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/interaction/gestures/PredictiveBackGesturePatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/interaction/gestures/PredictiveBackGesturePatch.kt index 33871634f..ad96c61d8 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/interaction/gestures/PredictiveBackGesturePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/interaction/gestures/PredictiveBackGesturePatch.kt @@ -1,9 +1,10 @@ package app.revanced.patches.all.misc.interaction.gestures -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch -@Suppress("unused", "ObjectPropertyName") -val `Predictive back gesture` by creatingResourcePatch( +@Suppress("unused") +val predictiveBackGesturePatch = resourcePatch( + name = "Predictive back gesture", description = "Enables the predictive back gesture introduced on Android 13.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/network/OverrideCertificatePinningPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/network/OverrideCertificatePinningPatch.kt index 50e23eefd..02594f120 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/network/OverrideCertificatePinningPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/network/OverrideCertificatePinningPatch.kt @@ -1,17 +1,18 @@ package app.revanced.patches.all.misc.network -import app.revanced.patcher.patch.creatingResourcePatch -import app.revanced.patches.all.misc.debugging.`Enable Android debugging` +import app.revanced.patcher.patch.resourcePatch +import app.revanced.patches.all.misc.debugging.enableAndroidDebuggingPatch import app.revanced.util.Utils.trimIndentMultiline import org.w3c.dom.Element import java.io.File -@Suppress("unused", "ObjectPropertyName") -val `Override certificate pinning` by creatingResourcePatch( +@Suppress("unused") +val overrideCertificatePinningPatch = resourcePatch( + name = "Override certificate pinning", description = "Overrides certificate pinning, allowing to inspect traffic via a proxy.", use = false, ) { - dependsOn(`Enable Android debugging`) + dependsOn(enableAndroidDebuggingPatch) apply { val resXmlDirectory = get("res/xml") diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/packagename/ChangePackageNamePatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/packagename/ChangePackageNamePatch.kt index 14d51c56e..927bf7088 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/packagename/ChangePackageNamePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/packagename/ChangePackageNamePatch.kt @@ -27,7 +27,8 @@ fun setOrGetFallbackPackageName(fallbackPackageName: String): String { } @Suppress("ObjectPropertyName") -val `Change package name` by creatingResourcePatch( +val changePackageNamePatch = resourcePatch( + name = "Change package name", description = "Appends \".revanced\" to the package name by default. " + "Changing the package name of the app can lead to unexpected issues.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/playintegrity/DisablePlayIntegrity.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/playintegrity/DisablePlayIntegrity.kt index e738504f1..12461fc40 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/playintegrity/DisablePlayIntegrity.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/playintegrity/DisablePlayIntegrity.kt @@ -1,7 +1,7 @@ package app.revanced.patches.all.misc.playintegrity import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.transformation.transformInstructionsPatch import app.revanced.util.getReference import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c @@ -18,8 +18,9 @@ private val CONTEXT_BIND_SERVICE_METHOD_REFERENCE = ImmutableMethodReference( "Z", ) -@Suppress("unused", "ObjectPropertyName") -val `Disable Play Integrity` by creatingBytecodePatch( +@Suppress("unused") +val disablePlayIntegrityPatch = bytecodePatch( + name = "Disable Play Integrity", description = "Prevents apps from using Play Integrity by pretending it is not available.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/screencapture/RemoveScreenCaptureRestrictionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/screencapture/RemoveScreenCaptureRestrictionPatch.kt index 81a4f5a74..0b0edcb69 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/screencapture/RemoveScreenCaptureRestrictionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/screencapture/RemoveScreenCaptureRestrictionPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.all.misc.screencapture -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.transformation.IMethodCall import app.revanced.patches.all.misc.transformation.filterMapInstruction35c @@ -28,8 +28,9 @@ private const val EXTENSION_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/extension/all/misc/screencapture/removerestriction/RemoveScreenCaptureRestrictionPatch" private const val EXTENSION_CLASS_DESCRIPTOR = "$EXTENSION_CLASS_DESCRIPTOR_PREFIX;" -@Suppress("unused", "ObjectPropertyName") -val `Remove screen capture restriction` by creatingBytecodePatch( +@Suppress("unused") +val removeScreenCaptureRestrictionPatch = bytecodePatch( + name = "Remove screen capture restriction", description = "Removes the restriction of capturing audio from apps that normally wouldn't allow it.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/screenshot/RemoveScreenshotRestrictionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/screenshot/RemoveScreenshotRestrictionPatch.kt index ce3cbaa0d..e54c3e59b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/screenshot/RemoveScreenshotRestrictionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/screenshot/RemoveScreenshotRestrictionPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.all.misc.screenshot import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.transformation.IMethodCall import app.revanced.patches.all.misc.transformation.filterMapInstruction35c import app.revanced.patches.all.misc.transformation.transformInstructionsPatch @@ -13,8 +13,9 @@ private const val EXTENSION_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/extension/all/misc/screenshot/removerestriction/RemoveScreenshotRestrictionPatch" private const val EXTENSION_CLASS_DESCRIPTOR = "$EXTENSION_CLASS_DESCRIPTOR_PREFIX;" -@Suppress("unused", "ObjectPropertyName") -val `Remove screenshot restriction` by creatingBytecodePatch( +@Suppress("unused") +val removeScreenshotRestrictionPatch = bytecodePatch( + name = "Remove screenshot restriction", description = "Removes the restriction of taking screenshots in apps that normally wouldn't allow it.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/shortcut/sharetargets/RemoveShareTargetsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/shortcut/sharetargets/RemoveShareTargetsPatch.kt index 14ba0293e..a14e16a76 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/shortcut/sharetargets/RemoveShareTargetsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/shortcut/sharetargets/RemoveShareTargetsPatch.kt @@ -1,14 +1,15 @@ package app.revanced.patches.all.misc.shortcut.sharetargets -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.asSequence import app.revanced.util.getNode import org.w3c.dom.Element import java.io.FileNotFoundException import java.util.logging.Logger -@Suppress("unused", "ObjectPropertyName") -val `Remove share targets` by creatingResourcePatch( +@Suppress("unused") +val removeShareTargetsPatch = resourcePatch( + name = "Remove share targets", description = "Removes share targets like directly sharing to a frequent contact.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/spoof/EnableRomSignatureSpoofing.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/spoof/EnableRomSignatureSpoofing.kt index af5999dfc..99d7a2c3c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/spoof/EnableRomSignatureSpoofing.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/spoof/EnableRomSignatureSpoofing.kt @@ -1,6 +1,6 @@ package app.revanced.patches.all.misc.spoof -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.patcher.patch.stringOption import app.revanced.util.getNode import com.android.apksig.ApkVerifier @@ -13,8 +13,9 @@ import java.security.cert.CertificateException import java.security.cert.CertificateFactory import java.util.* -@Suppress("unused", "ObjectPropertyName") -val `Enable ROM signature spoofing` by creatingResourcePatch( +@Suppress("unused") +val enableROMSignatureSpoofingPatch = resourcePatch( + name = "Enable ROM signature spoofing", description = "Spoofs the signature via the manifest meta-data \"fake-signature\". " + "This patch only works with ROMs that support signature spoofing.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/targetSdk/SetTargetSdkVersion34.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/targetSdk/SetTargetSdkVersion34.kt index 0b9121e45..05beaf8f0 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/targetSdk/SetTargetSdkVersion34.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/targetSdk/SetTargetSdkVersion34.kt @@ -1,12 +1,13 @@ package app.revanced.patches.all.misc.targetSdk -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.getNode import org.w3c.dom.Element import java.util.logging.Logger -@Suppress("unused", "ObjectPropertyName") -val `Set target SDK version 34` by creatingResourcePatch( +@Suppress("unused") +val setTargetSDKVersion34Patch = resourcePatch( + name = "Set target SDK version 34", description = "Changes the target SDK to version 34 (Android 14). " + "For devices running Android 15+, this will disable edge-to-edge display.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt index 5dff94834..1aa803e22 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/versioncode/ChangeVersionCodePatch.kt @@ -1,12 +1,13 @@ package app.revanced.patches.all.misc.versioncode -import app.revanced.patcher.patch.creatingResourcePatch import app.revanced.patcher.patch.intOption +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.getNode import org.w3c.dom.Element -@Suppress("unused", "ObjectPropertyName") -val `Change version code` by creatingResourcePatch( +@Suppress("unused") +val changeVersionCodePatch = resourcePatch( + name = "Change version code", description = "Changes the version code of the app. This will turn off app store updates " + "and allows downgrading an existing app install to an older app version.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/amazon/DeepLinkingPatch.kt b/patches/src/main/kotlin/app/revanced/patches/amazon/DeepLinkingPatch.kt index 14045ab6f..1a8041d7d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/amazon/DeepLinkingPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/amazon/DeepLinkingPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.amazon -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Always allow deep-linking` by creatingBytecodePatch( +@Suppress("unused") +val alwaysAllowDeepLinkingPatch = bytecodePatch( + name = "Always allow deep-linking", description = "Open Amazon links, even if the app is not set to handle Amazon links.", ) { compatibleWith("com.amazon.mShop.android.shopping") diff --git a/patches/src/main/kotlin/app/revanced/patches/angulus/ads/RemoveAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/angulus/ads/RemoveAdsPatch.kt index 27f57ba73..18af561cc 100644 --- a/patches/src/main/kotlin/app/revanced/patches/angulus/ads/RemoveAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/angulus/ads/RemoveAdsPatch.kt @@ -1,14 +1,14 @@ package app.revanced.patches.angulus.ads -import app.revanced.patcher.patch.creatingBytecodePatch -import app.revanced.patches.shared.misc.pairip.license.`Disable Pairip license check` +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.patches.shared.misc.pairip.license.disablePairipLicenseCheckPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("com.drinkplusplus.angulus") - dependsOn(`Disable Pairip license check`) + dependsOn(disablePairipLicenseCheckPatch) apply { // Always return 0 as the daily measurement count. diff --git a/patches/src/main/kotlin/app/revanced/patches/bandcamp/limitations/RemovePlayLimitsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/bandcamp/limitations/RemovePlayLimitsPatch.kt index 95e9653b6..6fda82ae4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/bandcamp/limitations/RemovePlayLimitsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/bandcamp/limitations/RemovePlayLimitsPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.bandcamp.limitations -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Remove play limits` by creatingBytecodePatch( +@Suppress("unused") +val removePlayLimitsPatch = bytecodePatch( + name = "Remove play limits", description = "Disables purchase nagging and playback limits of not purchased tracks.", ) { compatibleWith("com.bandcamp.android") diff --git a/patches/src/main/kotlin/app/revanced/patches/cieid/restrictions/root/BypassRootChecksPatch.kt b/patches/src/main/kotlin/app/revanced/patches/cieid/restrictions/root/BypassRootChecksPatch.kt index 9d06990f8..fc8a3322b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/cieid/restrictions/root/BypassRootChecksPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/cieid/restrictions/root/BypassRootChecksPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.cieid.restrictions.root -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Bypass root checks` by creatingBytecodePatch( +@Suppress("unused") +val bypassRootChecksPatch = bytecodePatch( + name = "Bypass root checks", description = "Removes the restriction to use the app with root permissions or on a custom ROM.", ) { compatibleWith("it.ipzs.cieid") diff --git a/patches/src/main/kotlin/app/revanced/patches/com/sbs/ondemand/tv/RemoveAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/com/sbs/ondemand/tv/RemoveAdsPatch.kt index b64d80146..a0579b97c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/com/sbs/ondemand/tv/RemoveAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/com/sbs/ondemand/tv/RemoveAdsPatch.kt @@ -1,17 +1,18 @@ package app.revanced.patches.com.sbs.ondemand.tv import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch -import app.revanced.patches.shared.misc.pairip.license.`Disable Pairip license check` +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.patches.shared.misc.pairip.license.disablePairipLicenseCheckPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Remove ads` by creatingBytecodePatch( +@Suppress("unused") +val removeAdsPatch = bytecodePatch( + name = "Remove ads", description = "Removes pre-roll, pause and on-demand advertisements from SBS On Demand TV.", ) { compatibleWith("com.sbs.ondemand.tv") - dependsOn(`Disable Pairip license check`) + dependsOn(disablePairipLicenseCheckPatch) apply { shouldShowAdvertisingTVMethod.returnEarly(true) diff --git a/patches/src/main/kotlin/app/revanced/patches/cricbuzz/ads/DisableAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/cricbuzz/ads/DisableAdsPatch.kt index 71e120ef3..6dde6e725 100644 --- a/patches/src/main/kotlin/app/revanced/patches/cricbuzz/ads/DisableAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/cricbuzz/ads/DisableAdsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.cricbuzz.ads import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.cricbuzz.misc.extension.sharedExtensionPatch import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstructionOrThrow @@ -14,8 +14,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/cricbuzz/ads/HideAdsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("com.cricbuzz.android"("6.24.01")) dependsOn(sharedExtensionPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt index ce0f9597c..51b4322c1 100644 --- a/patches/src/main/kotlin/app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.crunchyroll.ads import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.instructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstruction import app.revanced.util.removeFlags @@ -12,8 +12,8 @@ import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.reference.FieldReference -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("com.crunchyroll.crunchyroid") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/disneyplus/SkipAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/disneyplus/SkipAdsPatch.kt index 82a7d614a..b182241ab 100644 --- a/patches/src/main/kotlin/app/revanced/patches/disneyplus/SkipAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/disneyplus/SkipAdsPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.disneyplus import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Skip ads` by creatingBytecodePatch( +@Suppress("unused") +val skipAdsPatch = bytecodePatch( + name = "Skip ads", description = "Automatically skips ads.", ) { compatibleWith("com.disney.disneyplus") diff --git a/patches/src/main/kotlin/app/revanced/patches/duolingo/ad/DisableAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/duolingo/ad/DisableAdsPatch.kt index d2895eefa..0143f4f3c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/duolingo/ad/DisableAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/duolingo/ad/DisableAdsPatch.kt @@ -3,11 +3,11 @@ package app.revanced.patches.duolingo.ad import app.revanced.patcher.classDef import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Disable ads` by creatingBytecodePatch { +@Suppress("unused") +val disableAdsPatch = bytecodePatch("Disable ads") { // 6.55.3 and higher can show ads after each exercise. compatibleWith("com.duolingo"("6.54.5")) diff --git a/patches/src/main/kotlin/app/revanced/patches/duolingo/debug/EnableDebugMenuPatch.kt b/patches/src/main/kotlin/app/revanced/patches/duolingo/debug/EnableDebugMenuPatch.kt index 227521426..56892c0fb 100644 --- a/patches/src/main/kotlin/app/revanced/patches/duolingo/debug/EnableDebugMenuPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/duolingo/debug/EnableDebugMenuPatch.kt @@ -3,12 +3,13 @@ package app.revanced.patches.duolingo.debug import app.revanced.patcher.classDef import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Enable debug menu` by creatingBytecodePatch( +@Suppress("unused") +val enableDebugMenuPatch = bytecodePatch( + name = "Enable debug menu", use = false, ) { compatibleWith("com.duolingo") diff --git a/patches/src/main/kotlin/app/revanced/patches/duolingo/energy/SkipEnergyRechargeAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/duolingo/energy/SkipEnergyRechargeAdsPatch.kt index 3999b25ea..c8e16b332 100644 --- a/patches/src/main/kotlin/app/revanced/patches/duolingo/energy/SkipEnergyRechargeAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/duolingo/energy/SkipEnergyRechargeAdsPatch.kt @@ -2,11 +2,12 @@ package app.revanced.patches.duolingo.energy import app.revanced.patcher.classDef import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.findFieldFromToString -@Suppress("unused", "ObjectPropertyName") -val `Skip energy recharge ads` by creatingBytecodePatch( +@Suppress("unused") +val skipEnergyRechargeAdsPatch = bytecodePatch( + name = "Skip energy recharge ads", description = "Skips watching ads to recharge energy.", ) { compatibleWith("com.duolingo") diff --git a/patches/src/main/kotlin/app/revanced/patches/facebook/ads/mainfeed/HideSponsoredStoriesPatch.kt b/patches/src/main/kotlin/app/revanced/patches/facebook/ads/mainfeed/HideSponsoredStoriesPatch.kt index f8d3593cc..a28ca0c47 100644 --- a/patches/src/main/kotlin/app/revanced/patches/facebook/ads/mainfeed/HideSponsoredStoriesPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/facebook/ads/mainfeed/HideSponsoredStoriesPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.facebook.ads.mainfeed import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructionsWithLabels -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction31i @@ -10,8 +10,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable -@Suppress("unused", "ObjectPropertyName") -val `Hide 'Sponsored Stories'` by creatingBytecodePatch { +@Suppress("unused") +val hideSponsoredStoriesPatch = bytecodePatch("Hide 'Sponsored Stories'") { compatibleWith("com.facebook.katana"("490.0.0.63.82")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/facebook/ads/story/HideStoryAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/facebook/ads/story/HideStoryAdsPatch.kt index e078a4481..2f9af038c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/facebook/ads/story/HideStoryAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/facebook/ads/story/HideStoryAdsPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.facebook.ads.story -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly import com.android.tools.smali.dexlib2.mutable.MutableMethod -@Suppress("unused", "ObjectPropertyName") -val `Hide story ads` by creatingBytecodePatch( +@Suppress("unused") +val hideStoryAdsPatch = bytecodePatch( + name = "Hide story ads", description = "Hides the ads in the Facebook app stories.", ) { compatibleWith("com.facebook.katana") diff --git a/patches/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/BootloaderDetectionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/BootloaderDetectionPatch.kt index f94c80440..81507bb21 100644 --- a/patches/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/BootloaderDetectionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/BootloaderDetectionPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.finanzonline.detection.bootloader -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Remove bootloader detection` by creatingBytecodePatch( +@Suppress("unused") +val removeBootloaderDetectionPatch = bytecodePatch( + name = "Remove bootloader detection", description = "Removes the check for an unlocked bootloader.", ) { compatibleWith("at.gv.bmf.bmf2go") diff --git a/patches/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/RootDetectionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/RootDetectionPatch.kt index 3144a2f00..8ff3efd1c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/RootDetectionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/finanzonline/detection/root/RootDetectionPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.finanzonline.detection.root import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Remove root detection` by creatingBytecodePatch( +@Suppress("unused") +val removeRootDetectionPatch = bytecodePatch( + name = "Remove root detection", description = "Removes the check for root permissions and unlocked bootloader.", ) { compatibleWith("at.gv.bmf.bmf2go") diff --git a/patches/src/main/kotlin/app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatch.kt index f1df804fc..e09afa967 100644 --- a/patches/src/main/kotlin/app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatch.kt @@ -2,11 +2,12 @@ package app.revanced.patches.googlenews.customtabs import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Enable CustomTabs` by creatingBytecodePatch( +@Suppress("unused") +val enableCustomTabsPatch = bytecodePatch( + name = "Enable CustomTabs", description = "Enables CustomTabs to open articles in your default browser.", ) { compatibleWith("com.google.android.apps.magazines") diff --git a/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/backup/EnableDCIMFoldersBackupControlPatch.kt b/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/backup/EnableDCIMFoldersBackupControlPatch.kt index 6ccea14d3..bc13aaa1b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/backup/EnableDCIMFoldersBackupControlPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/backup/EnableDCIMFoldersBackupControlPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.googlephotos.misc.backup -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Enable DCIM folders backup control` by creatingBytecodePatch( +@Suppress("unused") +val enableDCIMFoldersBackupControlPatch = bytecodePatch( + name = "Enable DCIM folders backup control", description = "Disables always on backup for the Camera and other DCIM folders, allowing you to control backup " + "for each folder individually. This will make the app default to having no folders backed up.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/features/SpoofFeaturesPatch.kt b/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/features/SpoofFeaturesPatch.kt index 8f1093e1e..71046d14e 100644 --- a/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/features/SpoofFeaturesPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/googlephotos/misc/features/SpoofFeaturesPatch.kt @@ -2,15 +2,16 @@ package app.revanced.patches.googlephotos.misc.features import app.revanced.patcher.extensions.instructions import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.stringsOption import app.revanced.util.getReference import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.reference.StringReference -@Suppress("unused", "ObjectPropertyName") -val `Spoof features` by creatingBytecodePatch( +@Suppress("unused") +val spoofFeaturesPatch = bytecodePatch( + name = "Spoof features", description = "Spoofs the device to enable Google Pixel exclusive features, including unlimited storage.", ) { compatibleWith("com.google.android.apps.photos") diff --git a/patches/src/main/kotlin/app/revanced/patches/googlerecorder/restrictions/RemoveDeviceRestrictions.kt b/patches/src/main/kotlin/app/revanced/patches/googlerecorder/restrictions/RemoveDeviceRestrictions.kt index 96db5ec27..8c65e1194 100644 --- a/patches/src/main/kotlin/app/revanced/patches/googlerecorder/restrictions/RemoveDeviceRestrictions.kt +++ b/patches/src/main/kotlin/app/revanced/patches/googlerecorder/restrictions/RemoveDeviceRestrictions.kt @@ -3,11 +3,12 @@ package app.revanced.patches.googlerecorder.restrictions import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.removeInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Remove device restrictions` by creatingBytecodePatch( +@Suppress("unused") +val removeDeviceRestrictionsPatch = bytecodePatch( + name = "Remove device restrictions", description = "Removes restrictions from using the app on any device. Requires mounting patched app over original.", ) { compatibleWith("com.google.android.apps.recorder") diff --git a/patches/src/main/kotlin/app/revanced/patches/hexeditor/ad/DisableAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/hexeditor/ad/DisableAdsPatch.kt index a426cf5c8..870c2f5e3 100644 --- a/patches/src/main/kotlin/app/revanced/patches/hexeditor/ad/DisableAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/hexeditor/ad/DisableAdsPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.hexeditor.ad -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable ads` by creatingBytecodePatch { +@Suppress("unused") +val disableAdsPatch = bytecodePatch("Disable ads") { compatibleWith("com.myprog.hexedit") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/iconpackstudio/misc/pro/UnlockProPatch.kt b/patches/src/main/kotlin/app/revanced/patches/iconpackstudio/misc/pro/UnlockProPatch.kt index 5e1e027f8..f3325f70a 100644 --- a/patches/src/main/kotlin/app/revanced/patches/iconpackstudio/misc/pro/UnlockProPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/iconpackstudio/misc/pro/UnlockProPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.iconpackstudio.misc.pro -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Unlock pro` by creatingBytecodePatch { +@Suppress("unused") +val unlockProPatch = bytecodePatch("Unlock pro") { compatibleWith("ginlemon.iconpackstudio"("2.2 build 016")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/deviceintegrity/RemoveDeviceIntegrityChecksPatch.kt b/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/deviceintegrity/RemoveDeviceIntegrityChecksPatch.kt index 16f04ea6a..2b3b6b010 100644 --- a/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/deviceintegrity/RemoveDeviceIntegrityChecksPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/deviceintegrity/RemoveDeviceIntegrityChecksPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.idaustria.detection.deviceintegrity import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Remove device integrity checks` by creatingBytecodePatch( +@Suppress("unused") +val removeDeviceIntegrityChecksPatch = bytecodePatch( + name = "Remove device integrity checks", description = "Removes the check for root permissions and unlocked bootloader.", ) { compatibleWith("at.gv.oe.app") diff --git a/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/root/RootDetectionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/root/RootDetectionPatch.kt index 7da7720eb..cfb7e8d68 100644 --- a/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/root/RootDetectionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/root/RootDetectionPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.idaustria.detection.root -import app.revanced.patcher.patch.creatingBytecodePatch -import app.revanced.patches.idaustria.detection.deviceintegrity.`Remove device integrity checks` +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.patches.idaustria.detection.deviceintegrity.removeDeviceIntegrityChecksPatch -@Deprecated("Patch was superseded", ReplaceWith("`Remove device integrity checks`")) +@Deprecated("Patch was superseded", ReplaceWith("removeDeviceIntegrityChecksPatch")) @Suppress("unused") -val rootDetectionPatch by creatingBytecodePatch { - dependsOn(`Remove device integrity checks`) +val rootDetectionPatch = bytecodePatch { + dependsOn(removeDeviceIntegrityChecksPatch) } diff --git a/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/SpoofSignaturePatch.kt b/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/SpoofSignaturePatch.kt index 801e89df3..f25f35ed8 100644 --- a/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/SpoofSignaturePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/idaustria/detection/signature/SpoofSignaturePatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.idaustria.detection.signature -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Spoof signature` by creatingBytecodePatch( +@Suppress("unused") +val spoofSignaturePatch = bytecodePatch( + name = "Spoof signature", description = "Spoofs the signature of the app.", ) { compatibleWith("at.gv.oe.app") diff --git a/patches/src/main/kotlin/app/revanced/patches/inshorts/ad/InshortsAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/inshorts/ad/InshortsAdsPatch.kt index 6a07b0cdb..9665f4ace 100644 --- a/patches/src/main/kotlin/app/revanced/patches/inshorts/ad/InshortsAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/inshorts/ad/InshortsAdsPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.inshorts.ad -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("com.nis.app") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/ads/HideAdsPatch.kt index 33e75e1b7..7e8e21492 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/ads/HideAdsPatch.kt @@ -1,11 +1,11 @@ package app.revanced.patches.instagram.ads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.meta.ads.adInjectorMethod import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("com.instagram.android") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/feed/LimitFeedToFollowedProfiles.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/feed/LimitFeedToFollowedProfiles.kt index ea9234675..3e9f4c0aa 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/feed/LimitFeedToFollowedProfiles.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/feed/LimitFeedToFollowedProfiles.kt @@ -7,7 +7,7 @@ import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.firstMutableMethodDeclaratively import app.revanced.patcher.immutableClassDef import app.revanced.patcher.name -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.instagram.misc.extension.sharedExtensionPatch import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstructionOrThrow @@ -16,8 +16,9 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference internal const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/instagram/feed/LimitFeedToFollowedProfiles;" -@Suppress("unused", "ObjectPropertyName") -val `Limit feed to followed profiles` by creatingBytecodePatch( +@Suppress("unused") +val limitFeedToFollowedProfilesPatch = bytecodePatch( + name = "Limit feed to followed profiles", description = "Filters the home feed to display only content from profiles you follow.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/ghost/story/AnonymousStoryViewingPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/ghost/story/AnonymousStoryViewingPatch.kt index 3da541fa0..123ada7c2 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/ghost/story/AnonymousStoryViewingPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/ghost/story/AnonymousStoryViewingPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.instagram.ghost.story -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.Utils.trimIndentMultiline import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Anonymous story viewing` by creatingBytecodePatch( +@Suppress("unused") +val anonymousStoryViewingPatch = bytecodePatch( + name = "Anonymous story viewing", description = """ View stories without sending any information to the server. Your view will not appear in the story viewers list. diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/hide/explore/HideExploreFeed.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/hide/explore/HideExploreFeed.kt index aef1e893a..b8789fc4d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/hide/explore/HideExploreFeed.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/hide/explore/HideExploreFeed.kt @@ -2,11 +2,12 @@ package app.revanced.patches.instagram.hide.explore import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Hide explore feed` by creatingBytecodePatch( +@Suppress("unused") +val hideExploreFeedPatch = bytecodePatch( + name = "Hide explore feed", description = "Hides posts and reels from the explore/search page.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/hide/navigation/HideNavigationButtons.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/hide/navigation/HideNavigationButtons.kt index fc8d863ff..adf2e4c30 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/hide/navigation/HideNavigationButtons.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/hide/navigation/HideNavigationButtons.kt @@ -5,7 +5,7 @@ import app.revanced.patcher.firstMutableMethodDeclaratively import app.revanced.patcher.immutableClassDef import app.revanced.patcher.name import app.revanced.patcher.patch.booleanOption -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.instagram.misc.extension.sharedExtensionPatch import app.revanced.util.addInstructionsAtControlFlowLabel import app.revanced.util.findFreeRegister @@ -20,8 +20,9 @@ import java.util.logging.Logger private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/instagram/hide/navigation/HideNavigationButtonsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide navigation buttons` by creatingBytecodePatch( +@Suppress("unused") +val hideNavigationButtonsPatch = bytecodePatch( + name = "Hide navigation buttons", description = "Hides navigation bar buttons, such as the Reels and Create button.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/hide/stories/HideStories.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/hide/stories/HideStories.kt index 4ac080030..51bc3e8d6 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/hide/stories/HideStories.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/hide/stories/HideStories.kt @@ -1,10 +1,11 @@ package app.revanced.patches.instagram.hide.stories import app.revanced.patcher.extensions.removeInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Hide Stories from Home` by creatingBytecodePatch( +@Suppress("unused") +val hideStoriesFromHomePatch = bytecodePatch( + name = "Hide Stories from Home", description = "Hides Stories from the main page, by removing the buttons.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/hide/suggestions/HideSuggestedContent.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/hide/suggestions/HideSuggestedContent.kt index fd95359b3..d9e2b7d59 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/hide/suggestions/HideSuggestedContent.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/hide/suggestions/HideSuggestedContent.kt @@ -2,11 +2,12 @@ package app.revanced.patches.instagram.hide.suggestions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Hide suggested content` by creatingBytecodePatch( +@Suppress("unused") +val hideSuggestedContentPatch = bytecodePatch( + name = "Hide suggested content", description = "Hides suggested stories, reels, threads and survey from feed (Suggested posts will still be shown).", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/devmenu/EnableDeveloperMenuPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/devmenu/EnableDeveloperMenuPatch.kt index 508f984a1..13825e54e 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/devmenu/EnableDeveloperMenuPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/devmenu/EnableDeveloperMenuPatch.kt @@ -1,14 +1,15 @@ package app.revanced.patches.instagram.misc.devmenu import app.revanced.patcher.extensions.methodReference -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.Utils.trimIndentMultiline import app.revanced.util.indexOfFirstInstructionReversedOrThrow import app.revanced.util.returnEarly import com.android.tools.smali.dexlib2.Opcode -@Suppress("unused", "ObjectPropertyName") -val `Enable developer menu` by creatingBytecodePatch( +@Suppress("unused") +val enableDeveloperMenuPatch = bytecodePatch( + name = "Enable developer menu", description = """ Enables the developer menu, which can be found at the bottom of settings menu with name 'Internal Settings'. diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/links/OpenLinksExternallyPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/links/OpenLinksExternallyPatch.kt index e5067f91d..b4acecc16 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/links/OpenLinksExternallyPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/links/OpenLinksExternallyPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.instagram.misc.links import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.instagram.misc.extension.sharedExtensionPatch import app.revanced.util.indexOfFirstInstructionOrThrow import com.android.tools.smali.dexlib2.Opcode @@ -10,8 +10,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/instagram/misc/links/OpenLinksExternallyPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Open links externally` by creatingBytecodePatch( +@Suppress("unused") +val openLinksExternallyPatch = bytecodePatch( + name = "Open links externally", description = "Changes links to always open in your external browser, instead of the in-app browser.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/share/domain/ChangeLinkSharingDomainPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/share/domain/ChangeLinkSharingDomainPatch.kt index 39c6fea7e..d449bc818 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/share/domain/ChangeLinkSharingDomainPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/share/domain/ChangeLinkSharingDomainPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.instagram.misc.share.domain import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.stringOption import app.revanced.patches.instagram.misc.extension.sharedExtensionPatch import app.revanced.patches.instagram.misc.share.editShareLinksPatch @@ -10,8 +10,9 @@ import app.revanced.util.returnEarly internal const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/instagram/misc/share/domain/ChangeLinkSharingDomainPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Change link sharing domain` by creatingBytecodePatch( +@Suppress("unused") +val changeLinkSharingDomainPatch = bytecodePatch( + name = "Change link sharing domain", description = "Replaces the domain name of shared links.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/share/privacy/SanitizeSharingLinksPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/share/privacy/SanitizeSharingLinksPatch.kt index 89072d0db..838fcba8a 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/share/privacy/SanitizeSharingLinksPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/share/privacy/SanitizeSharingLinksPatch.kt @@ -1,15 +1,16 @@ package app.revanced.patches.instagram.misc.share.privacy import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.instagram.misc.extension.sharedExtensionPatch import app.revanced.patches.instagram.misc.share.editShareLinksPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/instagram/misc/share/privacy/SanitizeSharingLinksPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Sanitize sharing links` by creatingBytecodePatch( +@Suppress("unused") +val sanitizeSharingLinksPatch = bytecodePatch( + name = "Sanitize sharing links", description = "Removes the tracking query parameters from shared links.", ) { compatibleWith("com.instagram.android") @@ -23,7 +24,7 @@ val `Sanitize sharing links` by creatingBytecodePatch( """ invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->sanitizeSharingLink(Ljava/lang/String;)Ljava/lang/String; move-result-object v$register - """ + """, ) } } diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/signature/SignatureCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/signature/SignatureCheckPatch.kt index 287b2c3b7..3ee3f8238 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/misc/signature/SignatureCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/misc/signature/SignatureCheckPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.instagram.misc.signature import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable signature check` by creatingBytecodePatch( +@Suppress("unused") +val disableSignatureCheckPatch = bytecodePatch( + name = "Disable signature check", description = "Disables the signature check that can cause the app to crash on startup. " + "Using this patch may cause issues with sharing or opening external Instagram links.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/reels/DisableReelsScrollingPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/reels/DisableReelsScrollingPatch.kt index 3e83ed924..7db8a131f 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/reels/DisableReelsScrollingPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/reels/DisableReelsScrollingPatch.kt @@ -2,11 +2,12 @@ package app.revanced.patches.instagram.reels import app.revanced.patcher.classDef import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable Reels scrolling` by creatingBytecodePatch( +@Suppress("unused") +val disableReelsScrollingPatch = bytecodePatch( + name = "Disable Reels scrolling", description = "Disables the endless scrolling behavior in Instagram Reels, preventing swiping to the next Reel. " + "Note: On a clean install, the 'Tip' animation may appear but will stop on its own after a few seconds.", use = true, diff --git a/patches/src/main/kotlin/app/revanced/patches/instagram/story/flipping/DisableStoryAutoFlippingPatch.kt b/patches/src/main/kotlin/app/revanced/patches/instagram/story/flipping/DisableStoryAutoFlippingPatch.kt index d5592d935..abcd23641 100644 --- a/patches/src/main/kotlin/app/revanced/patches/instagram/story/flipping/DisableStoryAutoFlippingPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/instagram/story/flipping/DisableStoryAutoFlippingPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.instagram.story.flipping -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable story auto flipping` by creatingBytecodePatch( +@Suppress("unused") +val disableStoryAutoFlippingPatch = bytecodePatch( + name = "Disable story auto flipping", description = "Disable stories automatically flipping/skipping after some seconds.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/irplus/ad/RemoveAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/irplus/ad/RemoveAdsPatch.kt index 8680278ea..a8bbf6e72 100644 --- a/patches/src/main/kotlin/app/revanced/patches/irplus/ad/RemoveAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/irplus/ad/RemoveAdsPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.irplus.ad import app.revanced.patcher.extensions.addInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Remove ads` by creatingBytecodePatch { +@Suppress("unused") +val removeAdsPatch = bytecodePatch("Remove ads") { compatibleWith("net.binarymode.android.irplus") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/letterboxd/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/letterboxd/ads/HideAdsPatch.kt index c860058e4..7a160b43b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/letterboxd/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/letterboxd/ads/HideAdsPatch.kt @@ -1,11 +1,11 @@ package app.revanced.patches.letterboxd.ads import app.revanced.patcher.extensions.addInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("com.letterboxd.letterboxd") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatch.kt index 712ed051f..4c20a5ed1 100644 --- a/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/letterboxd/unlock/unlockAppIcons/UnlockAppIconsPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.letterboxd.unlock.unlockAppIcons -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Unlock app icons` by creatingBytecodePatch { +@Suppress("unused") +val unlockAppIconsPatch = bytecodePatch("Unlock app icons") { compatibleWith("com.letterboxd.letterboxd") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/login/DisableMandatoryLoginPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/login/DisableMandatoryLoginPatch.kt index cb3704b3c..0f0f495d9 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/login/DisableMandatoryLoginPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/login/DisableMandatoryLoginPatch.kt @@ -2,10 +2,10 @@ package app.revanced.patches.lightroom.misc.login import app.revanced.patcher.extensions.instructions import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Disable mandatory login` by creatingBytecodePatch { +@Suppress("unused") +val disableMandatoryLoginPatch = bytecodePatch("Disable mandatory login") { compatibleWith("com.adobe.lrmobile"("9.3.0")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/UnlockPremiumPatch.kt b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/UnlockPremiumPatch.kt index 98fe78a2b..3ef0a91ef 100644 --- a/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/UnlockPremiumPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/lightroom/misc/premium/UnlockPremiumPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.lightroom.misc.premium import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Unlock Premium` by creatingBytecodePatch { +@Suppress("unused") +val unlockPremiumPatch = bytecodePatch("Unlock Premium") { compatibleWith("com.adobe.lrmobile"("9.3.0")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/UnlockProVersionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/UnlockProVersionPatch.kt index 6850fc49f..026a25d5a 100644 --- a/patches/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/UnlockProVersionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/UnlockProVersionPatch.kt @@ -1,12 +1,12 @@ package app.revanced.patches.memegenerator.misc.pro import app.revanced.patcher.extensions.replaceInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.memegenerator.detection.license.licenseValidationPatch import app.revanced.patches.memegenerator.detection.signature.signatureVerificationPatch -@Suppress("unused", "ObjectPropertyName") -val `Unlock pro` by creatingBytecodePatch { +@Suppress("unused") +val unlockProPatch = bytecodePatch("Unlock pro") { dependsOn(signatureVerificationPatch, licenseValidationPatch) compatibleWith("com.zombodroid.MemeGenerator"("4.6364", "4.6370", "4.6375", "4.6377")) diff --git a/patches/src/main/kotlin/app/revanced/patches/messenger/inbox/HideInboxAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/messenger/inbox/HideInboxAdsPatch.kt index 72d96b9bd..dd9994ae7 100644 --- a/patches/src/main/kotlin/app/revanced/patches/messenger/inbox/HideInboxAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/messenger/inbox/HideInboxAdsPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.messenger.inbox import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Hide inbox ads` by creatingBytecodePatch( +@Suppress("unused") +val hideInboxAdsPatch = bytecodePatch( + name = "Hide inbox ads", description = "Hides ads in inbox.", ) { compatibleWith("com.facebook.orca") diff --git a/patches/src/main/kotlin/app/revanced/patches/messenger/inbox/HideInboxSubtabsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/messenger/inbox/HideInboxSubtabsPatch.kt index 55560138d..cca30b51b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/messenger/inbox/HideInboxSubtabsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/messenger/inbox/HideInboxSubtabsPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.messenger.inbox import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Hide inbox subtabs` by creatingBytecodePatch( +@Suppress("unused") +val hideInboxSubtabsPatch = bytecodePatch( + name = "Hide inbox subtabs", description = "Hides Home and Channels tabs between active now tray and chats.", ) { compatibleWith("com.facebook.orca") diff --git a/patches/src/main/kotlin/app/revanced/patches/messenger/layout/HideFacebookButtonPatch.kt b/patches/src/main/kotlin/app/revanced/patches/messenger/layout/HideFacebookButtonPatch.kt index df96bc8d0..cb2a47316 100644 --- a/patches/src/main/kotlin/app/revanced/patches/messenger/layout/HideFacebookButtonPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/messenger/layout/HideFacebookButtonPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.messenger.layout -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide Facebook button` by creatingBytecodePatch( +@Suppress("unused") +val hideFacebookButtonPatch = bytecodePatch( + name = "Hide Facebook button", description = "Hides the Facebook button in the top toolbar.", ) { compatibleWith("com.facebook.orca") diff --git a/patches/src/main/kotlin/app/revanced/patches/messenger/metaai/RemoveMetaAIPatch.kt b/patches/src/main/kotlin/app/revanced/patches/messenger/metaai/RemoveMetaAIPatch.kt index 78ae851f7..aaa490979 100644 --- a/patches/src/main/kotlin/app/revanced/patches/messenger/metaai/RemoveMetaAIPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/messenger/metaai/RemoveMetaAIPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.messenger.metaai import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.messenger.misc.extension.sharedExtensionPatch import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction @@ -11,8 +11,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction internal const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/messenger/metaai/RemoveMetaAIPatch;" internal const val EXTENSION_METHOD_NAME = "overrideBooleanFlag" -@Suppress("unused", "ObjectPropertyName") -val `Remove Meta AI` by creatingBytecodePatch( +@Suppress("unused") +val removeMetaAIPatch = bytecodePatch( + name = "Remove Meta AI", description = "Removes UI elements related to Meta AI.", ) { compatibleWith("com.facebook.orca") diff --git a/patches/src/main/kotlin/app/revanced/patches/mifitness/misc/locale/ForceEnglishLocalePatch.kt b/patches/src/main/kotlin/app/revanced/patches/mifitness/misc/locale/ForceEnglishLocalePatch.kt index 0c77028ae..95c41208d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/mifitness/misc/locale/ForceEnglishLocalePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/mifitness/misc/locale/ForceEnglishLocalePatch.kt @@ -2,17 +2,18 @@ package app.revanced.patches.mifitness.misc.locale import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch -import app.revanced.patches.mifitness.misc.login.`Fix login` +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.patches.mifitness.misc.login.fixLoginPatch import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Force English locale` by creatingBytecodePatch( +@Suppress("unused") +val forceEnglishLocalePatch = bytecodePatch( + name = "Force English locale", description = "Forces wearable devices to use the English locale.", ) { compatibleWith("com.xiaomi.wearable") - dependsOn(`Fix login`) + dependsOn(fixLoginPatch) apply { syncBluetoothLanguageMethodMatch.let { diff --git a/patches/src/main/kotlin/app/revanced/patches/mifitness/misc/login/FixLoginPatch.kt b/patches/src/main/kotlin/app/revanced/patches/mifitness/misc/login/FixLoginPatch.kt index 4f228c1ae..5208f694b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/mifitness/misc/login/FixLoginPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/mifitness/misc/login/FixLoginPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.mifitness.misc.login import app.revanced.patcher.extensions.addInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch @Suppress("ObjectPropertyName") -val `Fix login` by creatingBytecodePatch( +val fixLoginPatch = bytecodePatch( + name = "Fix login", description = "Fixes login for uncertified Mi Fitness app", ) { compatibleWith("com.xiaomi.wearable") diff --git a/patches/src/main/kotlin/app/revanced/patches/music/ad/video/HideVideoAds.kt b/patches/src/main/kotlin/app/revanced/patches/music/ad/video/HideVideoAds.kt index 1110669e8..5b1366cdc 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/ad/video/HideVideoAds.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/ad/video/HideVideoAds.kt @@ -1,7 +1,7 @@ package app.revanced.patches.music.ad.video import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.music.misc.extension.sharedExtensionPatch @@ -11,8 +11,9 @@ import app.revanced.patches.shared.misc.settings.preference.SwitchPreference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/HideVideoAdsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide music video ads` by creatingBytecodePatch( +@Suppress("unused") +val hideMusicVideoAdsPatch = bytecodePatch( + name = "Hide music video ads", description = "Adds an option to hide ads that appear while listening to or streaming music videos, podcasts, or songs.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/EnableExclusiveAudioPlayback.kt b/patches/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/EnableExclusiveAudioPlayback.kt index acfe3ff3f..cc4e23c09 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/EnableExclusiveAudioPlayback.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/audio/exclusiveaudio/EnableExclusiveAudioPlayback.kt @@ -1,12 +1,13 @@ package app.revanced.patches.music.audio.exclusiveaudio -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.music.misc.extension.sharedExtensionPatch import app.revanced.patches.music.misc.settings.settingsPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Enable exclusive audio playback` by creatingBytecodePatch( +@Suppress("unused") +val enableExclusiveAudioPlaybackPatch = bytecodePatch( + name = "Enable exclusive audio playback", description = "Enables the option to play audio without video.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/PermanentRepeatPatch.kt b/patches/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/PermanentRepeatPatch.kt index b08f7ce69..9f6a50e37 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/PermanentRepeatPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/interaction/permanentrepeat/PermanentRepeatPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.music.interaction.permanentrepeat import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.instructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.music.misc.extension.sharedExtensionPatch @@ -14,8 +14,9 @@ import app.revanced.util.findFreeRegister private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/PermanentRepeatPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Permanent repeat` by creatingBytecodePatch( +@Suppress("unused") +val permanentRepeatPatch = bytecodePatch( + name = "Permanent repeat", description = "Adds an option to always repeat even if the playlist ends or another track is played.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/layout/buttons/HideButtons.kt b/patches/src/main/kotlin/app/revanced/patches/music/layout/buttons/HideButtons.kt index 718cf5e03..cc858dab5 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/layout/buttons/HideButtons.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/layout/buttons/HideButtons.kt @@ -5,7 +5,7 @@ import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.firstMutableMethod import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.music.misc.extension.sharedExtensionPatch @@ -33,8 +33,9 @@ internal var topBarMenuItemImageView = -1L private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/HideButtonsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide buttons` by creatingBytecodePatch( +@Suppress("unused") +val hideButtonsPatch = bytecodePatch( + name = "Hide buttons", description = "Adds options to hide the cast, history, notification, and search buttons.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/layout/compactheader/HideCategoryBar.kt b/patches/src/main/kotlin/app/revanced/patches/music/layout/compactheader/HideCategoryBar.kt index 467f29b91..d56322c10 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/layout/compactheader/HideCategoryBar.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/layout/compactheader/HideCategoryBar.kt @@ -2,7 +2,7 @@ package app.revanced.patches.music.layout.compactheader import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.music.misc.extension.sharedExtensionPatch @@ -17,8 +17,9 @@ internal var chipCloud = -1L private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/HideCategoryBarPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide category bar` by creatingBytecodePatch( +@Suppress("unused") +val hideCategoryBarPatch = bytecodePatch( + name = "Hide category bar", description = "Adds an option to hide the category bar at the top of the homepage.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/layout/miniplayercolor/ChangeMiniplayerColor.kt b/patches/src/main/kotlin/app/revanced/patches/music/layout/miniplayercolor/ChangeMiniplayerColor.kt index b2bfd39c9..138fc99a0 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/layout/miniplayercolor/ChangeMiniplayerColor.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/layout/miniplayercolor/ChangeMiniplayerColor.kt @@ -6,7 +6,7 @@ import app.revanced.patcher.accessFlags import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.firstMutableMethodDeclaratively import app.revanced.patcher.parameterTypes -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.returnType import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -24,8 +24,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/ChangeMiniplayerColorPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Change miniplayer color` by creatingBytecodePatch( +@Suppress("unused") +val changeMiniplayerColorPatch = bytecodePatch( + name = "Change miniplayer color", description = "Adds an option to change the miniplayer background color to match the fullscreen player.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/NavigationBarPatch.kt b/patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/NavigationBarPatch.kt index a89694577..aaa61566b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/NavigationBarPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/layout/navigationbar/NavigationBarPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.music.layout.navigationbar import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -26,8 +26,9 @@ internal var text1 = -1L private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/NavigationBarPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Navigation bar` by creatingBytecodePatch( +@Suppress("unused") +val navigationBarPatch = bytecodePatch( + name = "Navigation bar", description = "Adds options to hide navigation bar, labels and buttons.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/layout/premium/HideGetPremiumPatch.kt b/patches/src/main/kotlin/app/revanced/patches/music/layout/premium/HideGetPremiumPatch.kt index f297e5002..9348dbe9a 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/layout/premium/HideGetPremiumPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/layout/premium/HideGetPremiumPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.music.misc.extension.sharedExtensionPatch @@ -15,8 +15,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/HideGetPremiumPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide 'Get Music Premium'` by creatingBytecodePatch( +@Suppress("unused") +val hideGetMusicPremiumPatch = bytecodePatch( + name = "Hide 'Get Music Premium'", description = "Adds an option to hide the \"Get Music Premium\" label in the settings and account menu.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/misc/androidauto/BypassCertificateChecksPatch.kt b/patches/src/main/kotlin/app/revanced/patches/music/misc/androidauto/BypassCertificateChecksPatch.kt index 6c1b9a144..1b1c6cbe7 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/misc/androidauto/BypassCertificateChecksPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/misc/androidauto/BypassCertificateChecksPatch.kt @@ -1,12 +1,13 @@ package app.revanced.patches.music.misc.androidauto -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.music.misc.extension.sharedExtensionPatch import app.revanced.patches.music.misc.settings.settingsPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Bypass certificate checks` by creatingBytecodePatch( +@Suppress("unused") +val bypassCertificateChecksPatch = bytecodePatch( + name = "Bypass certificate checks", description = "Bypasses certificate checks which prevent YouTube Music from working on Android Auto.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/music/misc/backgroundplayback/BackgroundPlaybackPatch.kt b/patches/src/main/kotlin/app/revanced/patches/music/misc/backgroundplayback/BackgroundPlaybackPatch.kt index 08bda5684..5d8b651c1 100644 --- a/patches/src/main/kotlin/app/revanced/patches/music/misc/backgroundplayback/BackgroundPlaybackPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/music/misc/backgroundplayback/BackgroundPlaybackPatch.kt @@ -1,12 +1,13 @@ package app.revanced.patches.music.misc.backgroundplayback -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.music.misc.extension.sharedExtensionPatch import app.revanced.patches.music.misc.settings.settingsPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Remove background playback restrictions` by creatingBytecodePatch( +@Suppress("unused") +val removeBackgroundPlaybackRestrictionsPatch = bytecodePatch( + name = "Remove background playback restrictions", description = "Removes restrictions on background playback, including playing kids videos in the background.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/UnlockProPatch.kt b/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/UnlockProPatch.kt index ab7348975..27fed2fb1 100644 --- a/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/UnlockProPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/myexpenses/misc/pro/UnlockProPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.myexpenses.misc.pro -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Unlock pro` by creatingBytecodePatch { +@Suppress("unused") +val unlockProPatch = bytecodePatch("Unlock pro") { compatibleWith("org.totschnig.myexpenses"("3.4.9")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/myfitnesspal/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/myfitnesspal/ads/HideAdsPatch.kt index 43bc2fb62..8df70dbcd 100644 --- a/patches/src/main/kotlin/app/revanced/patches/myfitnesspal/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/myfitnesspal/ads/HideAdsPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.myfitnesspal.ads import app.revanced.patcher.extensions.replaceInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch( - description = "Hides most of the ads across the app." +@Suppress("unused") +val hideAdsPatch = bytecodePatch( + name = "Hide ads", + description = "Hides most of the ads across the app.", ) { compatibleWith("com.myfitnesspal.android"("24.14.2")) diff --git a/patches/src/main/kotlin/app/revanced/patches/netguard/broadcasts/removerestriction/RemoveBroadcastsRestrictionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/netguard/broadcasts/removerestriction/RemoveBroadcastsRestrictionPatch.kt index 3ed424595..a7e6912e0 100644 --- a/patches/src/main/kotlin/app/revanced/patches/netguard/broadcasts/removerestriction/RemoveBroadcastsRestrictionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/netguard/broadcasts/removerestriction/RemoveBroadcastsRestrictionPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.netguard.broadcasts.removerestriction -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import org.w3c.dom.Element -@Suppress("unused", "ObjectPropertyName") -val `Remove broadcasts restriction` by creatingResourcePatch( +@Suppress("unused") +val removeBroadcastsRestrictionPatch = resourcePatch( + name = "Remove broadcasts restriction", description = "Enables starting/stopping NetGuard via broadcasts.", ) { compatibleWith("eu.faircode.netguard") diff --git a/patches/src/main/kotlin/app/revanced/patches/nunl/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/nunl/ads/HideAdsPatch.kt index 046d3c115..56296c9c0 100644 --- a/patches/src/main/kotlin/app/revanced/patches/nunl/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/nunl/ads/HideAdsPatch.kt @@ -3,14 +3,15 @@ package app.revanced.patches.nunl.ads import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.removeInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.shared.misc.extension.sharedExtensionPatch import app.revanced.util.indexOfFirstInstructionOrThrow import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction @Suppress("ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch( +val hideAdsPatch = bytecodePatch( + name = "Hide ads", description = "Hide ads and sponsored articles in list pages and remove pre-roll ads on videos.", ) { compatibleWith("nl.sanomamedia.android.nu") diff --git a/patches/src/main/kotlin/app/revanced/patches/nunl/firebase/SpoofCertificatePatch.kt b/patches/src/main/kotlin/app/revanced/patches/nunl/firebase/SpoofCertificatePatch.kt index bb29a3d6a..f53524bab 100644 --- a/patches/src/main/kotlin/app/revanced/patches/nunl/firebase/SpoofCertificatePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/nunl/firebase/SpoofCertificatePatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.nunl.firebase -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Spoof certificate` by creatingBytecodePatch( +@Suppress("unused") +val spoofCertificatePatch = bytecodePatch( + name = "Spoof certificate", description = "Spoofs the X-Android-Cert header to allow push messages.", ) { compatibleWith("nl.sanomamedia.android.nu") diff --git a/patches/src/main/kotlin/app/revanced/patches/openinghours/misc/fix/crash/FixCrashPatch.kt b/patches/src/main/kotlin/app/revanced/patches/openinghours/misc/fix/crash/FixCrashPatch.kt index a33cdfb7f..d2242b172 100644 --- a/patches/src/main/kotlin/app/revanced/patches/openinghours/misc/fix/crash/FixCrashPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/openinghours/misc/fix/crash/FixCrashPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.openinghours.misc.fix.crash import app.revanced.patcher.extensions.instructions import app.revanced.patcher.extensions.newLabel import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.getReference import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction21t @@ -11,8 +11,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.Instruction import com.android.tools.smali.dexlib2.iface.reference.MethodReference -@Suppress("unused", "ObjectPropertyName") -val `Fix crash` by creatingBytecodePatch( +@Suppress("unused") +val fixCrashPatch = bytecodePatch( + name = "Fix crash", description = "Fixes a crash when opening a place.", ) { compatibleWith("de.simon.openinghours"("1.0")) diff --git a/patches/src/main/kotlin/app/revanced/patches/orfon/detection/root/RemoveRootDetectionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/orfon/detection/root/RemoveRootDetectionPatch.kt index 9d36c81d5..262102105 100644 --- a/patches/src/main/kotlin/app/revanced/patches/orfon/detection/root/RemoveRootDetectionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/orfon/detection/root/RemoveRootDetectionPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.orfon.detection.root -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Remove root detection` by creatingBytecodePatch( - description = "Removes the check for root permissions and unlocked bootloader." +@Suppress("unused") +val removeRootDetectionPatch = bytecodePatch( + name = "Remove root detection", + description = "Removes the check for root permissions and unlocked bootloader.", ) { compatibleWith("com.nousguide.android.orftvthek") diff --git a/patches/src/main/kotlin/app/revanced/patches/pandora/ads/DisableAudioAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/pandora/ads/DisableAudioAdsPatch.kt index cb038a579..79dd9358a 100644 --- a/patches/src/main/kotlin/app/revanced/patches/pandora/ads/DisableAudioAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/pandora/ads/DisableAudioAdsPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.pandora.ads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable Audio Ads` by creatingBytecodePatch { +@Suppress("unused") +val disableAudioAdsPatch = bytecodePatch("Disable Audio Ads") { compatibleWith("com.pandora.android") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatch.kt index 2d60302e9..c63bae4d2 100644 --- a/patches/src/main/kotlin/app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.pandora.misc -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Enable unlimited skips` by creatingBytecodePatch { +@Suppress("unused") +val enableUnlimitedSkipsPatch = bytecodePatch("Enable unlimited skips") { compatibleWith("com.pandora.android") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/peacocktv/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/peacocktv/ads/HideAdsPatch.kt index fb057bad7..553add2b7 100644 --- a/patches/src/main/kotlin/app/revanced/patches/peacocktv/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/peacocktv/ads/HideAdsPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.peacocktv.ads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch( - description = "Hides all video ads." +@Suppress("unused") +val hideAdsPatch = bytecodePatch( + name = "Hide ads", + description = "Hides all video ads.", ) { compatibleWith("com.peacocktv.peacockandroid") diff --git a/patches/src/main/kotlin/app/revanced/patches/photomath/detection/deviceid/SpoofDeviceIdPatch.kt b/patches/src/main/kotlin/app/revanced/patches/photomath/detection/deviceid/SpoofDeviceIdPatch.kt index 6df6a5682..d1a4ca5cb 100644 --- a/patches/src/main/kotlin/app/revanced/patches/photomath/detection/deviceid/SpoofDeviceIdPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/photomath/detection/deviceid/SpoofDeviceIdPatch.kt @@ -1,12 +1,13 @@ package app.revanced.patches.photomath.detection.deviceid -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.photomath.detection.signature.signatureDetectionPatch import app.revanced.util.returnEarly import kotlin.random.Random -@Suppress("unused", "ObjectPropertyName") -val `Spoof device ID` by creatingBytecodePatch( +@Suppress("unused") +val spoofDeviceIDPatch = bytecodePatch( + name = "Spoof device ID", description = "Spoofs device ID to mitigate manual bans by developers.", ) { dependsOn(signatureDetectionPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/photomath/misc/annoyances/HideUpdatePopupPatch.kt b/patches/src/main/kotlin/app/revanced/patches/photomath/misc/annoyances/HideUpdatePopupPatch.kt index 5ab0aafdf..b7713695d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/photomath/misc/annoyances/HideUpdatePopupPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/photomath/misc/annoyances/HideUpdatePopupPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.photomath.misc.annoyances import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.photomath.detection.signature.signatureDetectionPatch -@Suppress("unused", "ObjectPropertyName") -val `Hide update popup` by creatingBytecodePatch( +@Suppress("unused") +val hideUpdatePopupPatch = bytecodePatch( + name = "Hide update popup", description = "Prevents the update popup from showing up.", ) { dependsOn(signatureDetectionPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPatch.kt b/patches/src/main/kotlin/app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPatch.kt index c5987f47b..eaffe6c19 100644 --- a/patches/src/main/kotlin/app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPatch.kt @@ -1,12 +1,12 @@ package app.revanced.patches.photomath.misc.unlock.plus -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.photomath.detection.signature.signatureDetectionPatch import app.revanced.patches.photomath.misc.unlock.bookpoint.enableBookpointPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Unlock plus` by creatingBytecodePatch { +@Suppress("unused") +val unlockPlusPatch = bytecodePatch("Unlock plus") { dependsOn(signatureDetectionPatch, enableBookpointPatch) compatibleWith("com.microblink.photomath") diff --git a/patches/src/main/kotlin/app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatch.kt b/patches/src/main/kotlin/app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatch.kt index 0e19a2660..98e303dee 100644 --- a/patches/src/main/kotlin/app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.piccomafr.misc -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.stringOption import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Spoof Android device ID` by creatingBytecodePatch( +@Suppress("unused") +val spoofAndroidDeviceIDPatch = bytecodePatch( + name = "Spoof Android device ID", description = "Spoofs the Android device ID used by the app for account authentication." + "This can be used to copy the account to another device.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/piccomafr/tracking/DisableTrackingPatch.kt b/patches/src/main/kotlin/app/revanced/patches/piccomafr/tracking/DisableTrackingPatch.kt index 21adabc37..d37280e45 100644 --- a/patches/src/main/kotlin/app/revanced/patches/piccomafr/tracking/DisableTrackingPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/piccomafr/tracking/DisableTrackingPatch.kt @@ -3,15 +3,16 @@ package app.revanced.patches.piccomafr.tracking import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.instructions import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.getReference import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.reference.StringReference -@Suppress("unused", "ObjectPropertyName") -val `Disable tracking` by creatingBytecodePatch( - description = "Disables tracking by replacing tracking URLs with example.com." +@Suppress("unused") +val disableTrackingPatch = bytecodePatch( + name = "Disable tracking", + description = "Disables tracking by replacing tracking URLs with example.com.", ) { compatibleWith( "com.piccomaeurope.fr"( @@ -57,7 +58,6 @@ val `Disable tracking` by creatingBytecodePatch( ) } - appMeasurementMethod.addInstruction(0, "return-void") } } diff --git a/patches/src/main/kotlin/app/revanced/patches/pixiv/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/pixiv/ads/HideAdsPatch.kt index c854e761f..269ea8bd9 100644 --- a/patches/src/main/kotlin/app/revanced/patches/pixiv/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/pixiv/ads/HideAdsPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.pixiv.ads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("jp.pxv.android"("6.141.1")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/primevideo/ads/SkipAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/primevideo/ads/SkipAdsPatch.kt index 0168e7764..a78fcf126 100644 --- a/patches/src/main/kotlin/app/revanced/patches/primevideo/ads/SkipAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/primevideo/ads/SkipAdsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.primevideo.ads import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.primevideo.misc.extension.sharedExtensionPatch import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstructionOrThrow @@ -11,8 +11,9 @@ import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.reference.MethodReference -@Suppress("unused", "ObjectPropertyName") -val `Skip ads` by creatingBytecodePatch( +@Suppress("unused") +val skipAdsPatch = bytecodePatch( + name = "Skip ads", description = "Automatically skips video stream ads.", ) { compatibleWith("com.amazon.avod.thirdpartyclient"("3.0.412.2947")) @@ -31,7 +32,7 @@ val `Skip ads` by creatingBytecodePatch( // move-result-object { playerRegister } val getPlayerIndex = indexOfFirstInstructionOrThrow { opcode == Opcode.INVOKE_VIRTUAL && - getReference()?.name == "getPrimaryPlayer" + getReference()?.name == "getPrimaryPlayer" } val playerRegister = getInstruction(getPlayerIndex + 1).registerA @@ -44,7 +45,7 @@ val `Skip ads` by creatingBytecodePatch( """ invoke-static { p0, p1, v$playerRegister }, Lapp/revanced/extension/primevideo/ads/SkipAdsPatch;->enterServerInsertedAdBreakState(Lcom/amazon/avod/media/ads/internal/state/ServerInsertedAdBreakState;Lcom/amazon/avod/media/ads/internal/state/AdBreakTrigger;Lcom/amazon/avod/media/playback/VideoPlayer;)V return-void - """ + """, ) } } diff --git a/patches/src/main/kotlin/app/revanced/patches/primevideo/misc/permissions/RenamePermissionsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/primevideo/misc/permissions/RenamePermissionsPatch.kt index ae31135a5..20f9e5217 100644 --- a/patches/src/main/kotlin/app/revanced/patches/primevideo/misc/permissions/RenamePermissionsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/primevideo/misc/permissions/RenamePermissionsPatch.kt @@ -1,13 +1,14 @@ package app.revanced.patches.primevideo.misc.permissions import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.asSequence import app.revanced.util.getNode import org.w3c.dom.Element -@Suppress("unused", "ObjectPropertyName") -val `Rename shared permissions` by creatingResourcePatch( +@Suppress("unused") +val renameSharedPermissionsPatch = resourcePatch( + name = "Rename shared permissions", description = "Rename certain permissions shared across Amazon apps. " + "Applying this patch can fix installation errors, but can also break features in certain apps.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt b/patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt index b3a9d5345..cce68b6c1 100644 --- a/patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/primevideo/video/speed/PlaybackSpeedPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.primevideo.video.speed import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.primevideo.misc.extension.sharedExtensionPatch import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstructionOrThrow @@ -13,8 +13,9 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/primevideo/videoplayer/PlaybackSpeedPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Playback speed` by creatingBytecodePatch( +@Suppress("unused") +val playbackSpeedPatch = bytecodePatch( + name = "Playback speed", description = "Adds playback speed controls to the video player.", ) { dependsOn( @@ -53,4 +54,4 @@ val `Playback speed` by creatingBytecodePatch( ) } } -} +} diff --git a/patches/src/main/kotlin/app/revanced/patches/protonmail/account/RemoveFreeAccountsLimitPatch.kt b/patches/src/main/kotlin/app/revanced/patches/protonmail/account/RemoveFreeAccountsLimitPatch.kt index 0ed2f184e..bc99597b9 100644 --- a/patches/src/main/kotlin/app/revanced/patches/protonmail/account/RemoveFreeAccountsLimitPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/protonmail/account/RemoveFreeAccountsLimitPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.protonmail.account -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.findElementByAttributeValueOrThrow -@Suppress("unused", "ObjectPropertyName") -val `Remove free accounts limit` by creatingResourcePatch( - description = "Removes the limit for maximum free accounts logged in." +@Suppress("unused") +val removeFreeAccountsLimitPatch = resourcePatch( + name = "Remove free accounts limit", + description = "Removes the limit for maximum free accounts logged in.", ) { compatibleWith("ch.protonmail.android"("4.15.0")) diff --git a/patches/src/main/kotlin/app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatch.kt b/patches/src/main/kotlin/app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatch.kt index d2aeed408..9f0a0fd97 100644 --- a/patches/src/main/kotlin/app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatch.kt @@ -1,12 +1,13 @@ package app.revanced.patches.protonmail.signature import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.findElementByAttributeValue import java.io.File -@Suppress("unused", "ObjectPropertyName") -val `Remove 'Sent from' signature` by creatingResourcePatch( +@Suppress("unused") +val removeSentFromSignaturePatch = resourcePatch( + name = "Remove 'Sent from' signature", description = "Removes the 'Sent from Proton Mail mobile' signature from emails.", ) { compatibleWith("ch.protonmail.android"("4.15.0")) diff --git a/patches/src/main/kotlin/app/revanced/patches/protonvpn/delay/RemoveDelayPatch.kt b/patches/src/main/kotlin/app/revanced/patches/protonvpn/delay/RemoveDelayPatch.kt index ceb771886..9783168db 100644 --- a/patches/src/main/kotlin/app/revanced/patches/protonvpn/delay/RemoveDelayPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/protonvpn/delay/RemoveDelayPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.protonvpn.delay -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Remove delay` by creatingBytecodePatch( - description = "Removes the delay when changing servers." +@Suppress("unused") +val removeDelayPatch = bytecodePatch( + name = "Remove delay", + description = "Removes the delay when changing servers.", ) { compatibleWith("ch.protonvpn.android") diff --git a/patches/src/main/kotlin/app/revanced/patches/protonvpn/splittunneling/UnlockSplitTunneling.kt b/patches/src/main/kotlin/app/revanced/patches/protonvpn/splittunneling/UnlockSplitTunneling.kt index 8bfc0f302..9839de45c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/protonvpn/splittunneling/UnlockSplitTunneling.kt +++ b/patches/src/main/kotlin/app/revanced/patches/protonvpn/splittunneling/UnlockSplitTunneling.kt @@ -3,14 +3,14 @@ package app.revanced.patches.protonvpn.splittunneling import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.removeInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstructionOrThrow import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.reference.MethodReference -@Suppress("unused", "ObjectPropertyName") -val `Unlock split tunneling` by creatingBytecodePatch { +@Suppress("unused") +val unlockSplitTunnelingPatch = bytecodePatch("Unlock split tunneling") { compatibleWith("ch.protonvpn.android") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/rar/misc/annoyances/purchasereminder/HidePurchaseReminderPatch.kt b/patches/src/main/kotlin/app/revanced/patches/rar/misc/annoyances/purchasereminder/HidePurchaseReminderPatch.kt index 45e253a54..d755c697d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/rar/misc/annoyances/purchasereminder/HidePurchaseReminderPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/rar/misc/annoyances/purchasereminder/HidePurchaseReminderPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.rar.misc.annoyances.purchasereminder import app.revanced.patcher.extensions.addInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Hide purchase reminder` by creatingBytecodePatch( - description = "Hides the popup that reminds you to purchase the app." +@Suppress("unused") +val hidePurchaseReminderPatch = bytecodePatch( + name = "Hide purchase reminder", + description = "Hides the popup that reminds you to purchase the app.", ) { compatibleWith("com.rarlab.rar") diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt index 73509f543..8cf4a3aa6 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/ad/general/HideAdsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.reddit.ad.general import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.removeInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.reddit.ad.comments.hideCommentAdsPatch import app.revanced.patches.reddit.misc.extension.sharedExtensionPatch import app.revanced.util.getReference @@ -13,8 +13,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c import com.android.tools.smali.dexlib2.iface.reference.FieldReference import com.android.tools.smali.dexlib2.iface.reference.MethodReference -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { dependsOn(hideCommentAdsPatch, sharedExtensionPatch) compatibleWith("com.reddit.frontpage") @@ -24,7 +24,7 @@ val `Hide ads` by creatingBytecodePatch { val filterMethodDescriptor = "Lapp/revanced/extension/reddit/patches/FilterPromotedLinksPatch;" + - "->filterChildren(Ljava/lang/Iterable;)Ljava/util/List;" + "->filterChildren(Ljava/lang/Iterable;)Ljava/util/List;" val setPostsListChildren = adPostMethod.implementation!!.instructions.first { instruction -> if (instruction.opcode != Opcode.IPUT_OBJECT) return@first false diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/ads/DisableAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/ads/DisableAdsPatch.kt index 75af181e9..b28cbbfd2 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/ads/DisableAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/ads/DisableAdsPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.reddit.customclients.boostforreddit.ads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable ads` by creatingBytecodePatch { +@Suppress("unused") +val disableAdsPatch = bytecodePatch("Disable ads") { compatibleWith("com.rubenmayayo.reddit") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch.kt index 241a12a8b..7483aff27 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/boostforreddit/fix/downloads/FixAudioMissingInDownloadsPatch.kt @@ -2,11 +2,12 @@ package app.revanced.patches.reddit.customclients.boostforreddit.fix.downloads import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Fix missing audio in video downloads` by creatingBytecodePatch( +@Suppress("unused") +val fixMissingAudioInVideoDownloadsPatch = bytecodePatch( + name = "Fix missing audio in video downloads", description = "Fixes audio missing in videos downloaded from v.redd.it.", ) { compatibleWith("com.rubenmayayo.reddit") diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt index 6c7636172..4cc87895e 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.reddit.customclients.infinityforreddit.subscription -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.reddit.customclients.infinityforreddit.api.spoofClientPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Unlock subscription` by creatingBytecodePatch( +@Suppress("unused") +val unlockSubscriptionPatch = bytecodePatch( + name = "Unlock subscription", description = "Unlocks the subscription feature but requires a custom client ID.", ) { dependsOn(spoofClientPatch) @@ -13,7 +14,7 @@ val `Unlock subscription` by creatingBytecodePatch( compatibleWith( "ml.docilealligator.infinityforreddit", "ml.docilealligator.infinityforreddit.plus", - "ml.docilealligator.infinityforreddit.patreon" + "ml.docilealligator.infinityforreddit.patreon", ) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/DisableAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/DisableAdsPatch.kt index ef8a73e51..3f8b5b49c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/DisableAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/joeyforreddit/ads/DisableAdsPatch.kt @@ -1,11 +1,11 @@ package app.revanced.patches.reddit.customclients.joeyforreddit.ads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy.disablePiracyDetectionPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable ads` by creatingBytecodePatch { +@Suppress("unused") +val disableAdsPatch = bytecodePatch("Disable ads") { dependsOn(disablePiracyDetectionPatch) compatibleWith("o.o.joey") diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/annoyances/startup/DisableSyncForLemmyBottomSheetPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/annoyances/startup/DisableSyncForLemmyBottomSheetPatch.kt index c4bca5537..e2bc618ef 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/annoyances/startup/DisableSyncForLemmyBottomSheetPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/annoyances/startup/DisableSyncForLemmyBottomSheetPatch.kt @@ -2,10 +2,11 @@ package app.revanced.patches.reddit.customclients.sync.syncforreddit.annoyances. import app.revanced.patcher.extensions.instructions import app.revanced.patcher.extensions.removeInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Disable Sync for Lemmy bottom sheet` by creatingBytecodePatch( +@Suppress("unused") +val disableSyncForLemmyBottomSheetPatch = bytecodePatch( + name = "Disable Sync for Lemmy bottom sheet", description = "Disables the bottom sheet at the startup that asks you to signup to \"Sync for Lemmy\".", ) { compatibleWith( diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/thumbnail/FixPostThumbnailsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/thumbnail/FixPostThumbnailsPatch.kt index e4f0c4e0a..f8180d52b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/thumbnail/FixPostThumbnailsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/thumbnail/FixPostThumbnailsPatch.kt @@ -1,17 +1,18 @@ package app.revanced.patches.reddit.customclients.sync.syncforreddit.fix.thumbnail import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Fix post thumbnails` by creatingBytecodePatch( +@Suppress("unused") +val fixPostThumbnailsPatch = bytecodePatch( + name = "Fix post thumbnails", description = "Fixes loading post thumbnails by correcting their URLs.", ) { compatibleWith( "com.laurencedawson.reddit_sync", "com.laurencedawson.reddit_sync.pro", - "com.laurencedawson.reddit_sync.dev" + "com.laurencedawson.reddit_sync.dev", ) // Image URLs contain escaped ampersands (&), let's replace these with unescaped ones (&). @@ -24,7 +25,7 @@ val `Fix post thumbnails` by creatingBytecodePatch( const-string v1, "&" invoke-virtual { p1, v0, v1 }, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; move-result-object p1 - """ + """, ) } } diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/video/FixVideoDownloadsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/video/FixVideoDownloadsPatch.kt index 74b676714..aa0fe5389 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/video/FixVideoDownloadsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/customclients/sync/syncforreddit/fix/video/FixVideoDownloadsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.reddit.customclients.sync.syncforreddit.fix.video import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.reddit.customclients.sync.syncforreddit.extension.sharedExtensionPatch import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c @@ -10,8 +10,9 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/syncforreddit/FixRedditVideoDownloadPatch;" private const val GET_LINKS_METHOD = "getLinks([B)[Ljava/lang/String;" -@Suppress("unused", "ObjectPropertyName") -val `Fix video downloads` by creatingBytecodePatch( +@Suppress("unused") +val fixVideoDownloadsPatch = bytecodePatch( + name = "Fix video downloads", description = "Fixes a bug in Sync's MPD parser resulting in only the audio-track being saved.", ) { dependsOn(sharedExtensionPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/layout/disablescreenshotpopup/DisableScreenshotPopupPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/layout/disablescreenshotpopup/DisableScreenshotPopupPatch.kt index f5624aa6b..12f74f4f6 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/layout/disablescreenshotpopup/DisableScreenshotPopupPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/layout/disablescreenshotpopup/DisableScreenshotPopupPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.reddit.layout.disablescreenshotpopup import app.revanced.patcher.extensions.addInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Disable screenshot popup` by creatingBytecodePatch( +@Suppress("unused") +val disableScreenshotPopupPatch = bytecodePatch( + name = "Disable screenshot popup", description = "Disables the popup that shows up when taking a screenshot.", ) { compatibleWith("com.reddit.frontpage") diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/layout/premiumicon/UnlockPremiumIconPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/layout/premiumicon/UnlockPremiumIconPatch.kt index 838c166b8..07f1eeaf4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/layout/premiumicon/UnlockPremiumIconPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/layout/premiumicon/UnlockPremiumIconPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.reddit.layout.premiumicon -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Unlock Premium icons` by creatingBytecodePatch( +@Suppress("unused") +val unlockPremiumIconsPatch = bytecodePatch( + name = "Unlock Premium icons", description = "Unlocks the Reddit Premium icons.", ) { compatibleWith("com.reddit.frontpage") diff --git a/patches/src/main/kotlin/app/revanced/patches/reddit/misc/tracking/url/SanitizeUrlQueryPatch.kt b/patches/src/main/kotlin/app/revanced/patches/reddit/misc/tracking/url/SanitizeUrlQueryPatch.kt index 95584f5dd..db5843818 100644 --- a/patches/src/main/kotlin/app/revanced/patches/reddit/misc/tracking/url/SanitizeUrlQueryPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/reddit/misc/tracking/url/SanitizeUrlQueryPatch.kt @@ -1,15 +1,16 @@ package app.revanced.patches.reddit.misc.tracking.url import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Sanitize sharing links` by creatingBytecodePatch( +@Suppress("unused") +val sanitizeSharingLinksPatch = bytecodePatch( + name = "Sanitize sharing links", description = "Removes the tracking query parameters from shared links.", ) { compatibleWith("com.reddit.frontpage") apply { - shareLinkFormatterMethod.addInstructions(0, "return-object p0",) + shareLinkFormatterMethod.addInstructions(0, "return-object p0") } } diff --git a/patches/src/main/kotlin/app/revanced/patches/samsung/radio/misc/fix/crash/FixCrashPatch.kt b/patches/src/main/kotlin/app/revanced/patches/samsung/radio/misc/fix/crash/FixCrashPatch.kt index 6aa791e02..e405585b1 100644 --- a/patches/src/main/kotlin/app/revanced/patches/samsung/radio/misc/fix/crash/FixCrashPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/samsung/radio/misc/fix/crash/FixCrashPatch.kt @@ -3,8 +3,8 @@ package app.revanced.patches.samsung.radio.misc.fix.crash import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch -import app.revanced.patches.samsung.radio.restrictions.device.`Bypass device checks` +import app.revanced.patcher.patch.bytecodePatch +import app.revanced.patches.samsung.radio.restrictions.device.bypassDeviceChecksPatch import app.revanced.util.findInstructionIndicesReversedOrThrow import app.revanced.util.indexOfFirstInstruction import com.android.tools.smali.dexlib2.Opcode @@ -12,11 +12,12 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/samsung/radio/misc/fix/crash/FixCrashPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Fix crashes` by creatingBytecodePatch( +@Suppress("unused") +val fixCrashesPatch = bytecodePatch( + name = "Fix crashes", description = "Prevents the app from crashing because of missing system permissions.", ) { - dependsOn(addManifestPermissionsPatch, `Bypass device checks`) + dependsOn(addManifestPermissionsPatch, bypassDeviceChecksPatch) extendWith("extensions/samsung/radio.rve") compatibleWith("com.sec.android.app.fm"("12.4.00.7", "12.3.00.13", "12.3.00.11")) diff --git a/patches/src/main/kotlin/app/revanced/patches/samsung/radio/restrictions/device/BypassDeviceChecksPatch.kt b/patches/src/main/kotlin/app/revanced/patches/samsung/radio/restrictions/device/BypassDeviceChecksPatch.kt index 49dbb54ee..f3b2e9f08 100644 --- a/patches/src/main/kotlin/app/revanced/patches/samsung/radio/restrictions/device/BypassDeviceChecksPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/samsung/radio/restrictions/device/BypassDeviceChecksPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.samsung.radio.restrictions.device import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.removeInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.findFreeRegister import app.revanced.util.getReference import app.revanced.util.indexOfFirstInstructionOrThrow @@ -12,10 +12,11 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/samsung/radio/restrictions/device/BypassDeviceChecksPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Bypass device checks` by creatingBytecodePatch( +@Suppress("unused") +val bypassDeviceChecksPatch = bytecodePatch( + name = "Bypass device checks", description = "Removes firmware and region blacklisting. " + - "This patch will still not allow the app to run on devices that do not have the required hardware.", + "This patch will still not allow the app to run on devices that do not have the required hardware.", ) { extendWith("extensions/samsung/radio.rve") compatibleWith("com.sec.android.app.fm"("12.4.00.7", "12.3.00.13", "12.3.00.11")) @@ -24,7 +25,7 @@ val `Bypass device checks` by creatingBytecodePatch( // Find the first string that start with "SM-", that's the list of incompatible devices. val firstStringIndex = checkDeviceMethod.indexOfFirstInstructionOrThrow { opcode == Opcode.CONST_STRING && - getReference()?.string?.startsWith("SM-") == true + getReference()?.string?.startsWith("SM-") == true } // Find the following filled-new-array (or filled-new-array/range) instruction. @@ -42,12 +43,11 @@ val `Bypass device checks` by creatingBytecodePatch( invoke-static { v$resultRegister }, $EXTENSION_CLASS_DESCRIPTOR->checkIfDeviceIsIncompatible([Ljava/lang/String;)Z move-result v$resultRegister return v$resultRegister - """ + """, ) // Remove the instructions before our strings. // Return false = The device is not blacklisted. checkDeviceMethod.removeInstructions(0, firstStringIndex) } - } diff --git a/patches/src/main/kotlin/app/revanced/patches/serviceportalbund/detection/root/RootDetectionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/serviceportalbund/detection/root/RootDetectionPatch.kt index c3f84adb4..244af6821 100644 --- a/patches/src/main/kotlin/app/revanced/patches/serviceportalbund/detection/root/RootDetectionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/serviceportalbund/detection/root/RootDetectionPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.serviceportalbund.detection.root -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Remove root detection` by creatingBytecodePatch( +@Suppress("unused") +val removeRootDetectionPatch = bytecodePatch( + name = "Remove root detection", description = "Removes the check for root permissions and unlocked bootloader.", ) { compatibleWith("at.gv.bka.serviceportal") diff --git a/patches/src/main/kotlin/app/revanced/patches/shared/misc/gms/GmsCoreSupportPatch.kt b/patches/src/main/kotlin/app/revanced/patches/shared/misc/gms/GmsCoreSupportPatch.kt index bb573cc50..a7c677e1d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/shared/misc/gms/GmsCoreSupportPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/shared/misc/gms/GmsCoreSupportPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.instructions import app.revanced.patcher.extensions.replaceInstruction import app.revanced.patcher.patch.* -import app.revanced.patches.all.misc.packagename.`Change package name` +import app.revanced.patches.all.misc.packagename.changePackageNamePatch import app.revanced.patches.all.misc.packagename.setOrGetFallbackPackageName import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -70,7 +70,7 @@ fun gmsCoreSupportPatch( ) { it!!.matches(Regex(PACKAGE_NAME_REGEX_PATTERN)) } dependsOn( - `Change package name`, + changePackageNamePatch, gmsCoreSupportResourcePatchFactory(gmsCoreVendorGroupIdOption), extensionPatch, ) @@ -517,7 +517,7 @@ fun gmsCoreSupportResourcePatch( block: ResourcePatchBuilder.() -> Unit = {}, ) = resourcePatch { dependsOn( - `Change package name`, + changePackageNamePatch, addResourcesPatch, ) diff --git a/patches/src/main/kotlin/app/revanced/patches/shared/misc/pairip/license/DisableLicenseCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/shared/misc/pairip/license/DisableLicenseCheckPatch.kt index 8a6d18010..02790ebee 100644 --- a/patches/src/main/kotlin/app/revanced/patches/shared/misc/pairip/license/DisableLicenseCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/shared/misc/pairip/license/DisableLicenseCheckPatch.kt @@ -1,12 +1,13 @@ package app.revanced.patches.shared.misc.pairip.license import app.revanced.patcher.extensions.addInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly import java.util.logging.Logger -@Suppress("unused", "ObjectPropertyName") -val `Disable Pairip license check` by creatingBytecodePatch( +@Suppress("unused") +val disablePairipLicenseCheckPatch = bytecodePatch( + name = "Disable Pairip license check", description = "Disables Play Integrity API (Pairip) client-side license check.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/shared/misc/privacy/DisableSentryTelemetry.kt b/patches/src/main/kotlin/app/revanced/patches/shared/misc/privacy/DisableSentryTelemetry.kt index 936bca758..8faa4e81e 100644 --- a/patches/src/main/kotlin/app/revanced/patches/shared/misc/privacy/DisableSentryTelemetry.kt +++ b/patches/src/main/kotlin/app/revanced/patches/shared/misc/privacy/DisableSentryTelemetry.kt @@ -1,12 +1,13 @@ package app.revanced.patches.shared.misc.privacy -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.asSequence import app.revanced.util.getNode import org.w3c.dom.Element -@Suppress("unused", "ObjectPropertyName") -val `Disable Sentry telemetry` by creatingResourcePatch( +@Suppress("unused") +val disableSentryTelemetryPatch = resourcePatch( + name = "Disable Sentry telemetry", description = "Disables Sentry telemetry. See https://sentry.io/for/android/ for more information.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/RemoveFileSizeLimitPatch.kt b/patches/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/RemoveFileSizeLimitPatch.kt index aed19637e..d588291aa 100644 --- a/patches/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/RemoveFileSizeLimitPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/solidexplorer2/functionality/filesize/RemoveFileSizeLimitPatch.kt @@ -2,11 +2,12 @@ package app.revanced.patches.solidexplorer2.functionality.filesize import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.iface.instruction.ThreeRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Remove file size limit` by creatingBytecodePatch( +@Suppress("unused") +val removeFileSizeLimitPatch = bytecodePatch( + name = "Remove file size limit", description = "Allows opening files larger than 2 MB in the text editor.", ) { compatibleWith("pl.solidexplorer2") diff --git a/patches/src/main/kotlin/app/revanced/patches/songpal/badge/BadgeTabPatch.kt b/patches/src/main/kotlin/app/revanced/patches/songpal/badge/BadgeTabPatch.kt index 326c4bbb2..c1879fb2f 100644 --- a/patches/src/main/kotlin/app/revanced/patches/songpal/badge/BadgeTabPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/songpal/badge/BadgeTabPatch.kt @@ -2,12 +2,13 @@ package app.revanced.patches.songpal.badge import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.removeInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch internal const val ACTIVITY_TAB_DESCRIPTOR = "Ljp/co/sony/vim/framework/ui/yourheadphones/YhContract\$Tab;" -@Suppress("unused", "ObjectPropertyName") -val `Remove badge tab` by creatingBytecodePatch( +@Suppress("unused") +val removeBadgeTabPatch = bytecodePatch( + name = "Remove badge tab", description = "Removes the badge tab from the activity tab.", ) { compatibleWith("com.sony.songpal.mdr") diff --git a/patches/src/main/kotlin/app/revanced/patches/songpal/badge/RemoveNotificationBadgePatch.kt b/patches/src/main/kotlin/app/revanced/patches/songpal/badge/RemoveNotificationBadgePatch.kt index e5a3da5ae..59aa826df 100644 --- a/patches/src/main/kotlin/app/revanced/patches/songpal/badge/RemoveNotificationBadgePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/songpal/badge/RemoveNotificationBadgePatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.songpal.badge import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Remove notification badge` by creatingBytecodePatch( +@Suppress("unused") +val removeNotificationBadgePatch = bytecodePatch( + name = "Remove notification badge", description = "Removes the red notification badge from the activity tab.", ) { compatibleWith("com.sony.songpal.mdr"("10.1.0")) diff --git a/patches/src/main/kotlin/app/revanced/patches/soundcloud/ad/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/soundcloud/ad/HideAdsPatch.kt index 37b82be48..e1a1ed870 100644 --- a/patches/src/main/kotlin/app/revanced/patches/soundcloud/ad/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/soundcloud/ad/HideAdsPatch.kt @@ -1,11 +1,11 @@ package app.revanced.patches.soundcloud.ad import app.revanced.patcher.extensions.* -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.soundcloud.shared.featureConstructorMethod -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("com.soundcloud.android"("2025.05.27-release")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/soundcloud/analytics/DisableTelemetryPatch.kt b/patches/src/main/kotlin/app/revanced/patches/soundcloud/analytics/DisableTelemetryPatch.kt index 15dcdb2eb..b49837d6c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/soundcloud/analytics/DisableTelemetryPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/soundcloud/analytics/DisableTelemetryPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.soundcloud.analytics import app.revanced.patcher.extensions.addInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Disable telemetry` by creatingBytecodePatch( +@Suppress("unused") +val disableTelemetryPatch = bytecodePatch( + name = "Disable telemetry", description = "Disables SoundCloud's telemetry system.", ) { compatibleWith("com.soundcloud.android"("2025.05.27-release")) diff --git a/patches/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/EnableOfflineSyncPatch.kt b/patches/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/EnableOfflineSyncPatch.kt index 9ebab6303..7fd111441 100644 --- a/patches/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/EnableOfflineSyncPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/soundcloud/offlinesync/EnableOfflineSyncPatch.kt @@ -1,15 +1,15 @@ package app.revanced.patches.soundcloud.offlinesync import app.revanced.patcher.extensions.* -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.soundcloud.shared.featureConstructorMethod import app.revanced.util.getReference import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.reference.FieldReference -@Suppress("unused", "ObjectPropertyName") -val `Enable offline sync` by creatingBytecodePatch { +@Suppress("unused") +val enableOfflineSyncPatch = bytecodePatch("Enable offline sync") { compatibleWith("com.soundcloud.android"("2025.05.27-release")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix/login/FixFacebookLoginPatch.kt b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix/login/FixFacebookLoginPatch.kt index 8528a5b66..d7f83a7fd 100644 --- a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix/login/FixFacebookLoginPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix/login/FixFacebookLoginPatch.kt @@ -1,13 +1,14 @@ package app.revanced.patches.spotify.misc.fix.login import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Fix Facebook login` by creatingBytecodePatch( +@Suppress("unused") +val fixFacebookLoginPatch = bytecodePatch( + name = "Fix Facebook login", description = - "Fix logging in with Facebook when the app is patched by always opening the login in a web browser window.", + "Fix logging in with Facebook when the app is patched by always opening the login in a web browser window.", ) { compatibleWith("com.spotify.music") diff --git a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/lyrics/ChangeLyricsProviderPatch.kt b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/lyrics/ChangeLyricsProviderPatch.kt index d9acf8aa4..e2c4e636a 100644 --- a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/lyrics/ChangeLyricsProviderPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/lyrics/ChangeLyricsProviderPatch.kt @@ -8,7 +8,7 @@ import app.revanced.patcher.firstMutableMethodDeclaratively import app.revanced.patcher.instructions import app.revanced.patcher.method import app.revanced.patcher.parameterTypes -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.stringOption import app.revanced.patcher.returnType import app.revanced.util.getReference @@ -26,8 +26,9 @@ import java.net.URISyntaxException import java.net.UnknownHostException import java.util.logging.Logger -@Suppress("unused", "ObjectPropertyName") -val `Change lyrics provider` by creatingBytecodePatch( +@Suppress("unused") +val changeLyricsProviderPatch = bytecodePatch( + name = "Change lyrics provider", description = "Changes the lyrics provider to a custom one.", use = false, ) { @@ -74,7 +75,7 @@ val `Change lyrics provider` by creatingBytecodePatch( val setUrlBuilderHostIndex = indexOfFirstInstructionReversedOrThrow(invokeBuildUrlIndex) { val reference = getReference() reference?.definingClass == "Lokhttp3/HttpUrl${"$"}Builder;" && - reference.parameterTypes.firstOrNull() == "Ljava/lang/String;" + reference.parameterTypes.firstOrNull() == "Ljava/lang/String;" } val hostRegister = getInstruction(setUrlBuilderHostIndex).registerD diff --git a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/privacy/SanitizeSharingLinksPatch.kt b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/privacy/SanitizeSharingLinksPatch.kt index 9ed03b32c..e25384f16 100644 --- a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/privacy/SanitizeSharingLinksPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/privacy/SanitizeSharingLinksPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.spotify.misc.privacy import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.methodReference -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.spotify.misc.extension.sharedExtensionPatch import app.revanced.util.indexOfFirstInstructionOrThrow import com.android.tools.smali.dexlib2.AccessFlags @@ -12,8 +12,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/spotify/misc/privacy/SanitizeSharingLinksPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Sanitize sharing links` by creatingBytecodePatch( +@Suppress("unused") +val sanitizeSharingLinksPatch = bytecodePatch( + name = "Sanitize sharing links", description = "Removes the tracking query parameters from shared links.", ) { compatibleWith("com.spotify.music") diff --git a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/widgets/FixThirdPartyLaunchersWidgets.kt b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/widgets/FixThirdPartyLaunchersWidgets.kt index b37ed70aa..1ce32fceb 100644 --- a/patches/src/main/kotlin/app/revanced/patches/spotify/misc/widgets/FixThirdPartyLaunchersWidgets.kt +++ b/patches/src/main/kotlin/app/revanced/patches/spotify/misc/widgets/FixThirdPartyLaunchersWidgets.kt @@ -1,10 +1,11 @@ package app.revanced.patches.spotify.misc.widgets -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Fix third party launchers widgets` by creatingBytecodePatch( +@Suppress("unused") +val fixThirdPartyLaunchersWidgetsPatch = bytecodePatch( + name = "Fix third party launchers widgets", description = "Fixes Spotify widgets not working in third party launchers, like Nova Launcher.", ) { compatibleWith("com.spotify.music") diff --git a/patches/src/main/kotlin/app/revanced/patches/stocard/layout/HideOffersTabPatch.kt b/patches/src/main/kotlin/app/revanced/patches/stocard/layout/HideOffersTabPatch.kt index 499f8eca2..b63eba2d2 100644 --- a/patches/src/main/kotlin/app/revanced/patches/stocard/layout/HideOffersTabPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/stocard/layout/HideOffersTabPatch.kt @@ -1,11 +1,11 @@ package app.revanced.patches.stocard.layout -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.childElementsSequence import app.revanced.util.getNode -@Suppress("unused", "ObjectPropertyName") -val `Hide offers tab` by creatingResourcePatch { +@Suppress("unused") +val hideOffersTabPatch = resourcePatch("Hide offers tab") { compatibleWith("de.stocard.stocard") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/stocard/layout/HideStoryBubblesPatch.kt b/patches/src/main/kotlin/app/revanced/patches/stocard/layout/HideStoryBubblesPatch.kt index 44d7ed946..2819b7689 100644 --- a/patches/src/main/kotlin/app/revanced/patches/stocard/layout/HideStoryBubblesPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/stocard/layout/HideStoryBubblesPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.stocard.layout -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.util.getNode -@Suppress("unused", "ObjectPropertyName") -val `Hide story bubbles` by creatingResourcePatch { +@Suppress("unused") +val hideStoryBubblesPatch = resourcePatch("Hide story bubbles") { compatibleWith("de.stocard.stocard") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/strava/mediaupload/OverwriteMediaUploadParametersPatch.kt b/patches/src/main/kotlin/app/revanced/patches/strava/mediaupload/OverwriteMediaUploadParametersPatch.kt index fe612e70a..c941ae8a8 100644 --- a/patches/src/main/kotlin/app/revanced/patches/strava/mediaupload/OverwriteMediaUploadParametersPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/strava/mediaupload/OverwriteMediaUploadParametersPatch.kt @@ -1,13 +1,14 @@ package app.revanced.patches.strava.mediaupload import app.revanced.patcher.firstClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.intOption import app.revanced.patcher.patch.longOption import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Overwrite media upload parameters` by creatingBytecodePatch( +@Suppress("unused") +val overwriteMediaUploadParametersPatch = bytecodePatch( + name = "Overwrite media upload parameters", description = "Overwrites the compression, resize and trim media (images and videos) parameters returned by Strava's server before upload.", ) { compatibleWith("com.strava") diff --git a/patches/src/main/kotlin/app/revanced/patches/strava/password/EnablePasswordLoginPatch.kt b/patches/src/main/kotlin/app/revanced/patches/strava/password/EnablePasswordLoginPatch.kt index 344d15d49..3d24c92cd 100644 --- a/patches/src/main/kotlin/app/revanced/patches/strava/password/EnablePasswordLoginPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/strava/password/EnablePasswordLoginPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.strava.password -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Enable password login` by creatingBytecodePatch( +@Suppress("unused") +val enablePasswordLoginPatch = bytecodePatch( + name = "Enable password login", description = "Re-enables password login after having used an OTP code.", ) { compatibleWith("com.strava") diff --git a/patches/src/main/kotlin/app/revanced/patches/strava/privacy/BlockSnowplowTrackingPatch.kt b/patches/src/main/kotlin/app/revanced/patches/strava/privacy/BlockSnowplowTrackingPatch.kt index 48daf08e2..4387be357 100644 --- a/patches/src/main/kotlin/app/revanced/patches/strava/privacy/BlockSnowplowTrackingPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/strava/privacy/BlockSnowplowTrackingPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.strava.privacy -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Block Snowplow tracking` by creatingBytecodePatch( +@Suppress("unused") +val blockSnowplowTrackingPatch = bytecodePatch( + name = "Block Snowplow tracking", description = "Blocks Snowplow analytics. See https://snowplow.io for more information.", ) { compatibleWith("com.strava") diff --git a/patches/src/main/kotlin/app/revanced/patches/strava/quickedit/DisableQuickEditPatch.kt b/patches/src/main/kotlin/app/revanced/patches/strava/quickedit/DisableQuickEditPatch.kt index e322a3792..f77b83b4d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/strava/quickedit/DisableQuickEditPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/strava/quickedit/DisableQuickEditPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.strava.quickedit -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable Quick Edit` by creatingBytecodePatch( +@Suppress("unused") +val disableQuickEditPatch = bytecodePatch( + name = "Disable Quick Edit", description = "Prevents the Quick Edit prompt from popping up.", ) { compatibleWith("com.strava") diff --git a/patches/src/main/kotlin/app/revanced/patches/strava/subscription/UnlockSubscriptionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/strava/subscription/UnlockSubscriptionPatch.kt index a781ea041..c09aeae68 100644 --- a/patches/src/main/kotlin/app/revanced/patches/strava/subscription/UnlockSubscriptionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/strava/subscription/UnlockSubscriptionPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.strava.subscription -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Unlock subscription features` by creatingBytecodePatch( +@Suppress("unused") +val unlockSubscriptionFeaturesPatch = bytecodePatch( + name = "Unlock subscription features", description = "Unlocks \"Routes\", \"Matched Runs\" and \"Segment Efforts\".", ) { compatibleWith("com.strava") diff --git a/patches/src/main/kotlin/app/revanced/patches/strava/upselling/DisableSubscriptionSuggestionsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/strava/upselling/DisableSubscriptionSuggestionsPatch.kt index f230ab525..8de2faa36 100644 --- a/patches/src/main/kotlin/app/revanced/patches/strava/upselling/DisableSubscriptionSuggestionsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/strava/upselling/DisableSubscriptionSuggestionsPatch.kt @@ -2,14 +2,14 @@ package app.revanced.patches.strava.upselling import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.removeInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation import com.android.tools.smali.dexlib2.immutable.ImmutableMethod import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable -@Suppress("unused", "ObjectPropertyName") -val `Disable subscription suggestions` by creatingBytecodePatch { +@Suppress("unused") +val disableSubscriptionSuggestionsPatch = bytecodePatch("Disable subscription suggestions") { compatibleWith("com.strava") apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/swissid/integritycheck/RemoveGooglePlayIntegrityCheckPatch.kt b/patches/src/main/kotlin/app/revanced/patches/swissid/integritycheck/RemoveGooglePlayIntegrityCheckPatch.kt index a608729f0..ab4cb6b04 100644 --- a/patches/src/main/kotlin/app/revanced/patches/swissid/integritycheck/RemoveGooglePlayIntegrityCheckPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/swissid/integritycheck/RemoveGooglePlayIntegrityCheckPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.swissid.integritycheck import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch private const val RESULT_METHOD_REFERENCE = " Lcom/swisssign/deviceintegrity/DeviceintegrityPlugin\$onMethodCall\$1;->" + @@ -9,8 +9,9 @@ private const val RESULT_METHOD_REFERENCE = private const val SUCCESS_METHOD_REFERENCE = "Lio/flutter/plugin/common/MethodChannel\$Result;->success(Ljava/lang/Object;)V" -@Suppress("unused", "ObjectPropertyName") -val `Remove Google Play Integrity check` by creatingBytecodePatch( +@Suppress("unused") +val removeGooglePlayIntegrityCheckPatch = bytecodePatch( + name = "Remove Google Play Integrity check", description = "Removes the Google Play Integrity check. With this it's possible to use SwissID on custom ROMS." + "If the device is rooted, root permissions must be hidden from the app.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/threads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/threads/HideAdsPatch.kt index ec855161c..e0c92255f 100644 --- a/patches/src/main/kotlin/app/revanced/patches/threads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/threads/HideAdsPatch.kt @@ -1,11 +1,11 @@ package app.revanced.patches.threads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.meta.ads.adInjectorMethod import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch { +@Suppress("unused") +val hideAdsPatch = bytecodePatch("Hide ads") { compatibleWith("com.instagram.barcelona"("382.0.0.51.85")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/UnlockThemePatch.kt b/patches/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/UnlockThemePatch.kt index 51a9b30ea..97954126f 100644 --- a/patches/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/UnlockThemePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/ticktick/misc/themeunlock/UnlockThemePatch.kt @@ -2,10 +2,11 @@ package app.revanced.patches.ticktick.misc.themeunlock import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.removeInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Unlock themes` by creatingBytecodePatch( +@Suppress("unused") +val unlockThemesPatch = bytecodePatch( + name = "Unlock themes", description = "Unlocks all themes that are inaccessible until a certain level is reached.", ) { compatibleWith("com.ticktick.task") diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/FeedFilterPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/FeedFilterPatch.kt index 763a70225..40755038d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/FeedFilterPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/FeedFilterPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.feedfilter import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.instructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tiktok.misc.extension.sharedExtensionPatch import app.revanced.patches.tiktok.misc.settings.Settings import app.revanced.patches.tiktok.misc.settings.settingsStatusLoadMethod @@ -11,8 +11,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/tiktok/feedfilter/FeedItemsFilter;" -@Suppress("unused", "ObjectPropertyName") -val `Feed filter` by creatingBytecodePatch( +@Suppress("unused") +val feedFilterPatch = bytecodePatch( + name = "Feed filter", description = "Removes ads, livestreams, stories, image videos " + "and videos with a specific amount of views or likes from the feed.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch.kt index cefca550e..5ed3d1af4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch.kt @@ -4,14 +4,15 @@ import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tiktok.shared.onRenderFirstFrameMethod import app.revanced.util.indexOfFirstInstructionOrThrow import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Remember clear display` by creatingBytecodePatch( +@Suppress("unused") +val rememberClearDisplayPatch = bytecodePatch( + name = "Remember clear display", description = "Remembers the clear display configurations in between videos.", ) { compatibleWith( diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch.kt index 852b02e3e..464a294a8 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/DownloadsPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.tiktok.interaction.downloads import app.revanced.patcher.extensions.* -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tiktok.misc.extension.sharedExtensionPatch import app.revanced.patches.tiktok.misc.settings.Settings import app.revanced.patches.tiktok.misc.settings.settingsStatusLoadMethod @@ -15,7 +15,7 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/tiktok/download/DownloadsPatch;" @Suppress("unused") -val Downloads by creatingBytecodePatch( +val Downloads = bytecodePatch( description = "Removes download restrictions and changes the default path to download to.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/ShowSeekbarPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/ShowSeekbarPatch.kt index 225a4c66b..7c8a0e914 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/ShowSeekbarPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/ShowSeekbarPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.tiktok.interaction.seekbar import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Show seekbar` by creatingBytecodePatch( +@Suppress("unused") +val showSeekbarPatch = bytecodePatch( + name = "Show seekbar", description = "Shows progress bar for all video.", ) { compatibleWith( diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/PlaybackSpeedPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/PlaybackSpeedPatch.kt index 237ed7c42..3af55ea8c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/PlaybackSpeedPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/PlaybackSpeedPatch.kt @@ -5,7 +5,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.firstMutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tiktok.shared.getEnterFromMethod import app.revanced.patches.tiktok.shared.onRenderFirstFrameMethod import app.revanced.util.getReference @@ -14,8 +14,9 @@ import app.revanced.util.returnEarly import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction11x import com.android.tools.smali.dexlib2.iface.reference.MethodReference -@Suppress("unused", "ObjectPropertyName") -val `Playback speed` by creatingBytecodePatch( +@Suppress("unused") +val playbackSpeedPatch = bytecodePatch( + name = "Playback speed", description = "Enables the playback speed option for all videos and " + "retains the speed configurations in between videos.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/DisableLoginRequirementPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/DisableLoginRequirementPatch.kt index b492b884b..2405b3111 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/DisableLoginRequirementPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/DisableLoginRequirementPatch.kt @@ -1,10 +1,10 @@ package app.revanced.patches.tiktok.misc.login.disablerequirement -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable login requirement` by creatingBytecodePatch { +@Suppress("unused") +val disableLoginRequirementPatch = bytecodePatch("Disable login requirement") { compatibleWith( "com.ss.android.ugc.trill", "com.zhiliaoapp.musically", diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/FixGoogleLoginPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/FixGoogleLoginPatch.kt index cb1473b99..4469b8df6 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/FixGoogleLoginPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/FixGoogleLoginPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.tiktok.misc.login.fixgoogle -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly import com.android.tools.smali.dexlib2.mutable.MutableMethod -@Suppress("unused", "ObjectPropertyName") -val `Fix Google login` by creatingBytecodePatch( +@Suppress("unused") +val fixGoogleLoginPatch = bytecodePatch( + name = "Fix Google login", description = "Allows logging in with a Google account.", ) { compatibleWith( diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/SettingsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/SettingsPatch.kt index f528c456f..5400829b8 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/SettingsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/SettingsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.misc.settings import app.revanced.patcher.extensions.* import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.shared.layout.branding.addBrandLicensePatch import app.revanced.patches.tiktok.misc.extension.sharedExtensionPatch import app.revanced.util.indexOfFirstInstruction @@ -12,7 +12,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/tiktok/settings/TikTokActivityHook;" -val Settings by creatingBytecodePatch( +val Settings = bytecodePatch( description = "Adds ReVanced settings to TikTok.", ) { dependsOn(sharedExtensionPatch, addBrandLicensePatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/share/SanitizeShareUrlsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/share/SanitizeShareUrlsPatch.kt index 663ba1c01..da6e6aaac 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/share/SanitizeShareUrlsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/share/SanitizeShareUrlsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.tiktok.misc.share import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tiktok.misc.extension.sharedExtensionPatch import app.revanced.util.findFreeRegister import app.revanced.util.getReference @@ -15,8 +15,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/tiktok/share/ShareUrlSanitizer;" -@Suppress("unused", "ObjectPropertyName") -val `Sanitize sharing links` by creatingBytecodePatch( +@Suppress("unused") +val sanitizeSharingLinksPatch = bytecodePatch( + name = "Sanitize sharing links", description = "Removes the tracking query parameters from shared links.", ) { dependsOn(sharedExtensionPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/SpoofSimPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/SpoofSimPatch.kt index 65cab18b0..9e39796ec 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/SpoofSimPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/SpoofSimPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.firstMutableMethod -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tiktok.misc.extension.sharedExtensionPatch import app.revanced.patches.tiktok.misc.settings.Settings import app.revanced.patches.tiktok.misc.settings.settingsStatusLoadMethod @@ -13,8 +13,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c import com.android.tools.smali.dexlib2.iface.reference.MethodReference -@Suppress("unused", "ObjectPropertyName") -val `SIM spoof` by creatingBytecodePatch( +@Suppress("unused") +val sIMSpoofPatch = bytecodePatch( + name = "SIM spoof", description = "Spoofs the information which is retrieved from the SIM card.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/trakt/UnlockProPatch.kt b/patches/src/main/kotlin/app/revanced/patches/trakt/UnlockProPatch.kt index a85040cbd..101502a92 100644 --- a/patches/src/main/kotlin/app/revanced/patches/trakt/UnlockProPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/trakt/UnlockProPatch.kt @@ -1,11 +1,11 @@ package app.revanced.patches.trakt import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.mutable.MutableMethod -@Suppress("unused", "ObjectPropertyName") -val `Unlock pro` by creatingBytecodePatch { +@Suppress("unused") +val unlockProPatch = bytecodePatch("Unlock pro") { compatibleWith("tv.trakt.trakt"("1.1.1")) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/tudortmund/lockscreen/ShowOnLockscreenPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tudortmund/lockscreen/ShowOnLockscreenPatch.kt index 677fd7eae..8ab356f0a 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tudortmund/lockscreen/ShowOnLockscreenPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tudortmund/lockscreen/ShowOnLockscreenPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.instructions import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tudortmund.misc.extension.sharedExtensionPatch import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c @@ -15,8 +15,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/tudortmund/lockscreen/ShowOnLockscreenPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Show on lockscreen` by creatingBytecodePatch( +@Suppress("unused") +val showOnLockscreenPatch = bytecodePatch( + name = "Show on lockscreen", description = "Shows student id and student ticket on lockscreen.", ) { dependsOn(sharedExtensionPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/tumblr/ads/DisableDashboardAds.kt b/patches/src/main/kotlin/app/revanced/patches/tumblr/ads/DisableDashboardAds.kt index 171882b85..c5310ea85 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tumblr/ads/DisableDashboardAds.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tumblr/ads/DisableDashboardAds.kt @@ -1,11 +1,12 @@ package app.revanced.patches.tumblr.ads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tumblr.timelinefilter.addTimelineObjectTypeFilter import app.revanced.patches.tumblr.timelinefilter.filterTimelineObjectsPatch -@Suppress("unused", "ObjectPropertyName") -val `Disable dashboard ads` by creatingBytecodePatch( +@Suppress("unused") +val disableDashboardAdsPatch = bytecodePatch( + name = "Disable dashboard ads", description = "Disables ads in the dashboard.", ) { dependsOn(filterTimelineObjectsPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch.kt index c076a89ed..71bdda792 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/adfree/DisableAdFreeBannerPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.tumblr.annoyances.adfree -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tumblr.featureflags.addFeatureFlagOverride import app.revanced.patches.tumblr.featureflags.overrideFeatureFlagsPatch -@Suppress("unused", "ObjectPropertyName") -val `Disable Ad-Free Banner` by creatingBytecodePatch( +@Suppress("unused") +val disableAdFreeBannerPatch = bytecodePatch( + name = "Disable Ad-Free Banner", description = "Disables the banner with a frog, prompting you to buy Tumblr Ad-Free.", ) { dependsOn(overrideFeatureFlagsPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch.kt b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch.kt index 932c2e10a..0454cc9ef 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/inappupdate/DisableInAppUpdatePatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.tumblr.annoyances.inappupdate -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tumblr.featureflags.addFeatureFlagOverride import app.revanced.patches.tumblr.featureflags.overrideFeatureFlagsPatch -@Suppress("unused", "ObjectPropertyName") -val `Disable in-app update` by creatingBytecodePatch( +@Suppress("unused") +val disableInAppUpdatePatch = bytecodePatch( + name = "Disable in-app update", description = "Disables the in-app update check and update prompt.", ) { dependsOn(overrideFeatureFlagsPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/notifications/DisableBlogNotificationReminderPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/notifications/DisableBlogNotificationReminderPatch.kt index 38ca3344f..0bb5a69a5 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/notifications/DisableBlogNotificationReminderPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/notifications/DisableBlogNotificationReminderPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.tumblr.annoyances.notifications import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Disable blog notification reminder` by creatingBytecodePatch( +@Suppress("unused") +val disableBlogNotificationReminderPatch = bytecodePatch( + name = "Disable blog notification reminder", description = "Disables the reminder to enable notifications for blogs you visit.", ) { compatibleWith("com.tumblr") diff --git a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/popups/DisableGiftMessagePopupPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/popups/DisableGiftMessagePopupPatch.kt index 14abe1133..c447c2a59 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/popups/DisableGiftMessagePopupPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/popups/DisableGiftMessagePopupPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.tumblr.annoyances.popups -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Disable gift message popup` by creatingBytecodePatch( +@Suppress("unused") +val disableGiftMessagePopupPatch = bytecodePatch( + name = "Disable gift message popup", description = "Disables the popup suggesting to buy TumblrMart items for other people.", ) { compatibleWith("com.tumblr") diff --git a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/tv/DisableTumblrTvPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/tv/DisableTumblrTvPatch.kt index 364ae44ce..4e66acab4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/tv/DisableTumblrTvPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tumblr/annoyances/tv/DisableTumblrTvPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.tumblr.annoyances.tv -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.tumblr.featureflags.addFeatureFlagOverride import app.revanced.patches.tumblr.featureflags.overrideFeatureFlagsPatch -@Suppress("unused", "ObjectPropertyName") -val `Disable Tumblr TV` by creatingBytecodePatch( +@Suppress("unused") +val disableTumblrTVPatch = bytecodePatch( + name = "Disable Tumblr TV", description = "Removes the Tumblr TV navigation button from the bottom navigation bar.", ) { dependsOn(overrideFeatureFlagsPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/tumblr/fixes/FixOldVersionsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/tumblr/fixes/FixOldVersionsPatch.kt index a118ee5da..a3e72f3d8 100644 --- a/patches/src/main/kotlin/app/revanced/patches/tumblr/fixes/FixOldVersionsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/tumblr/fixes/FixOldVersionsPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.tumblr.fixes import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Fix old versions` by creatingBytecodePatch( +@Suppress("unused") +val fixOldVersionsPatch = bytecodePatch( + name = "Fix old versions", description = "Fixes old versions of the app (v33.2 and earlier) breaking due to Tumblr removing remnants of Tumblr" + " Live from the API, which causes many requests to fail. This patch has no effect on newer versions of the app.", use = false, diff --git a/patches/src/main/kotlin/app/revanced/patches/twitch/ad/audio/AudioAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitch/ad/audio/AudioAdsPatch.kt index 58b2f2d35..36e544656 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitch/ad/audio/AudioAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitch/ad/audio/AudioAdsPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.twitch.ad.audio import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -11,8 +11,9 @@ import app.revanced.patches.twitch.misc.extension.sharedExtensionPatch import app.revanced.patches.twitch.misc.settings.PreferenceScreen import app.revanced.patches.twitch.misc.settings.Settings -@Suppress("unused", "ObjectPropertyName") -val `Block audio ads` by creatingBytecodePatch( +@Suppress("unused") +val blockAudioAdsPatch = bytecodePatch( + name = "Block audio ads", description = "Blocks audio ads in streams and VODs.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/twitch/ad/embedded/EmbeddedAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitch/ad/embedded/EmbeddedAdsPatch.kt index 5fd7e5d0e..3cd215431 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitch/ad/embedded/EmbeddedAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitch/ad/embedded/EmbeddedAdsPatch.kt @@ -1,20 +1,21 @@ package app.revanced.patches.twitch.ad.embedded import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.shared.misc.settings.preference.ListPreference -import app.revanced.patches.twitch.ad.video.`Block video ads` +import app.revanced.patches.twitch.ad.video.blockVideoAdsPatch import app.revanced.patches.twitch.misc.extension.sharedExtensionPatch import app.revanced.patches.twitch.misc.settings.PreferenceScreen import app.revanced.patches.twitch.misc.settings.Settings -@Suppress("unused", "ObjectPropertyName") -val `Block embedded ads` by creatingBytecodePatch( +@Suppress("unused") +val blockEmbeddedAdsPatch = bytecodePatch( + name = "Block embedded ads", description = "Blocks embedded stream ads using services like Luminous or PurpleAdBlocker.", ) { dependsOn( - `Block video ads`, + blockVideoAdsPatch, sharedExtensionPatch, Settings, ) diff --git a/patches/src/main/kotlin/app/revanced/patches/twitch/ad/video/VideoAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitch/ad/video/VideoAdsPatch.kt index cd9828699..7e2f80a07 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitch/ad/video/VideoAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitch/ad/video/VideoAdsPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -15,7 +15,8 @@ import app.revanced.patches.twitch.misc.settings.PreferenceScreen import app.revanced.patches.twitch.misc.settings.Settings @Suppress("ObjectPropertyName") -val `Block video ads` by creatingBytecodePatch( +val blockVideoAdsPatch = bytecodePatch( + name = "Block video ads", description = "Blocks video ads in streams and VODs.", ) { val conditionCall = "Lapp/revanced/extension/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z" diff --git a/patches/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/ShowDeletedMessagesPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/ShowDeletedMessagesPatch.kt index 418636827..5cea39b26 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/ShowDeletedMessagesPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitch/chat/antidelete/ShowDeletedMessagesPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.ListPreference @@ -12,8 +12,9 @@ import app.revanced.patches.twitch.misc.extension.sharedExtensionPatch import app.revanced.patches.twitch.misc.settings.PreferenceScreen import app.revanced.patches.twitch.misc.settings.Settings -@Suppress("unused", "ObjectPropertyName") -val `Show deleted messages` by creatingBytecodePatch( +@Suppress("unused") +val showDeletedMessagesPatch = bytecodePatch( + name = "Show deleted messages", description = "Shows deleted chat messages behind a clickable spoiler.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/twitch/chat/autoclaim/AutoClaimChannelPointsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitch/chat/autoclaim/AutoClaimChannelPointsPatch.kt index 178997012..06745c5a5 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitch/chat/autoclaim/AutoClaimChannelPointsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitch/chat/autoclaim/AutoClaimChannelPointsPatch.kt @@ -4,15 +4,16 @@ import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.instructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference import app.revanced.patches.twitch.misc.settings.PreferenceScreen import app.revanced.patches.twitch.misc.settings.Settings -@Suppress("unused", "ObjectPropertyName") -val `Auto claim channel points` by creatingBytecodePatch( +@Suppress("unused") +val autoClaimChannelPointsPatch = bytecodePatch( + name = "Auto claim channel points", description = "Automatically claim Channel Points.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/twitch/debug/DebugModePatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitch/debug/DebugModePatch.kt index f8adc81c1..451ac5b86 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitch/debug/DebugModePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitch/debug/DebugModePatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.twitch.debug import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -10,7 +10,8 @@ import app.revanced.patches.twitch.misc.settings.PreferenceScreen import app.revanced.patches.twitch.misc.settings.Settings @Suppress("ObjectPropertyName") -val `Debug mode` by creatingBytecodePatch( +val debugModePatch = bytecodePatch( + name = "Debug mode", description = "Enables Twitch's internal debugging mode.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/twitch/misc/settings/SettingsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitch/misc/settings/SettingsPatch.kt index bfbc111bc..ed35b087d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitch/misc/settings/SettingsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitch/misc/settings/SettingsPatch.kt @@ -6,7 +6,7 @@ import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.instructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.* @@ -36,7 +36,7 @@ fun addSettingPreference(screen: BasePreference) { preferences += screen } -val Settings by creatingBytecodePatch( +val Settings = bytecodePatch( description = "Adds settings menu to Twitch.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/twitter/interaction/downloads/UnlockDownloadsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitter/interaction/downloads/UnlockDownloadsPatch.kt index abb089da4..f3134cbdc 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitter/interaction/downloads/UnlockDownloadsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitter/interaction/downloads/UnlockDownloadsPatch.kt @@ -2,13 +2,14 @@ package app.revanced.patches.twitter.interaction.downloads import app.revanced.patcher.MatchBuilder import app.revanced.patcher.extensions.* -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction -@Suppress("unused", "ObjectPropertyName") -val `Unlock downloads` by creatingBytecodePatch( +@Suppress("unused") +val unlockDownloadsPatch = bytecodePatch( + name = "Unlock downloads", description = "Unlocks the ability to download any video. GIFs can be downloaded via the menu on long press.", ) { compatibleWith("com.twitter.android") diff --git a/patches/src/main/kotlin/app/revanced/patches/twitter/layout/viewcount/HideViewCountPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitter/layout/viewcount/HideViewCountPatch.kt index 3daf7d02d..d95a340ab 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitter/layout/viewcount/HideViewCountPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitter/layout/viewcount/HideViewCountPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.twitter.layout.viewcount -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide view count` by creatingBytecodePatch( +@Suppress("unused") +val hideViewCountPatch = bytecodePatch( + name = "Hide view count", description = "Hides the view count of Posts.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/dynamiccolor/DynamicColorPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/dynamiccolor/DynamicColorPatch.kt index 4341e5478..c079fcf15 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/dynamiccolor/DynamicColorPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/dynamiccolor/DynamicColorPatch.kt @@ -1,12 +1,13 @@ package app.revanced.patches.twitter.misc.dynamiccolor import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import java.io.FileWriter import java.nio.file.Files -@Suppress("unused", "ObjectPropertyName") -val `Dynamic color` by creatingResourcePatch( +@Suppress("unused") +val dynamicColorPatch = resourcePatch( + name = "Dynamic color", description = "Replaces the default X (Formerly Twitter) Blue with the user's Material You palette.", ) { compatibleWith( diff --git a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/ChangeLinkSharingDomainPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/ChangeLinkSharingDomainPatch.kt index 16c3bafda..77660b011 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/ChangeLinkSharingDomainPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/ChangeLinkSharingDomainPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.twitter.misc.links import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.stringOption import app.revanced.patches.twitter.misc.extension.sharedExtensionPatch import app.revanced.util.indexOfFirstInstructionOrThrow @@ -58,8 +58,9 @@ internal val changeLinkSharingDomainResourcePatch = resourcePatch { } */ -@Suppress("unused", "ObjectPropertyName") -val `Change link sharing domain` by creatingBytecodePatch( +@Suppress("unused") +val changeLinkSharingDomainPatch = bytecodePatch( + name = "Change link sharing domain", description = "Replaces the domain name of shared links. Using this patch can prevent making posts that quote other posts.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/SanitizeSharingLinksPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/SanitizeSharingLinksPatch.kt index 2d87a0a00..26ec58b1b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/SanitizeSharingLinksPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/SanitizeSharingLinksPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.twitter.misc.links import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch -@Suppress("unused", "ObjectPropertyName") -val `Sanitize sharing links` by creatingBytecodePatch( +@Suppress("unused") +val sanitizeSharingLinksPatch = bytecodePatch( + name = "Sanitize sharing links", description = "Removes the tracking query parameters from shared links.", ) { compatibleWith( diff --git a/patches/src/main/kotlin/app/revanced/patches/viber/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/viber/ads/HideAdsPatch.kt index 92afbd780..b6bb5deba 100644 --- a/patches/src/main/kotlin/app/revanced/patches/viber/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/viber/ads/HideAdsPatch.kt @@ -5,13 +5,14 @@ import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.typeReference import app.revanced.patcher.firstMutableMethodDeclaratively import app.revanced.patcher.parameterTypes -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.returnType import app.revanced.util.returnEarly import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction -@Suppress("unused", "ObjectPropertyName") -val `Hide Ads` by creatingBytecodePatch( +@Suppress("unused") +val hideAdsPatch = bytecodePatch( + name = "Hide Ads", description = "Hides ad banners between chats.", ) { compatibleWith("com.viber.voip"("25.9.2.0", "26.1.2.0")) diff --git a/patches/src/main/kotlin/app/revanced/patches/viber/misc/navbar/HideNavigationButtons.kt b/patches/src/main/kotlin/app/revanced/patches/viber/misc/navbar/HideNavigationButtons.kt index 4f77967ef..b828c1f21 100644 --- a/patches/src/main/kotlin/app/revanced/patches/viber/misc/navbar/HideNavigationButtons.kt +++ b/patches/src/main/kotlin/app/revanced/patches/viber/misc/navbar/HideNavigationButtons.kt @@ -3,11 +3,12 @@ package app.revanced.patches.viber.misc.navbar import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.immutableClassDef import app.revanced.patcher.patch.booleanOption -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import java.util.logging.Logger -@Suppress("unused", "ObjectPropertyName") -val `Hide navigation buttons` by creatingBytecodePatch( +@Suppress("unused") +val hideNavigationButtonsPatch = bytecodePatch( + name = "Hide navigation buttons", description = "Permanently hides navigation bar buttons, such as Explore and Marketplace.", use = false, ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/warnwetter/misc/promocode/PromoCodeUnlockPatch.kt b/patches/src/main/kotlin/app/revanced/patches/warnwetter/misc/promocode/PromoCodeUnlockPatch.kt index ab098c37c..af3e58795 100644 --- a/patches/src/main/kotlin/app/revanced/patches/warnwetter/misc/promocode/PromoCodeUnlockPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/warnwetter/misc/promocode/PromoCodeUnlockPatch.kt @@ -1,11 +1,12 @@ package app.revanced.patches.warnwetter.misc.promocode -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.warnwetter.misc.firebasegetcert.firebaseGetCertPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Promo code unlock` by creatingBytecodePatch( +@Suppress("unused") +val promoCodeUnlockPatch = bytecodePatch( + name = "Promo code unlock", description = "Disables the validation of promo code. Any code will work to unlock all features.", ) { dependsOn(firebaseGetCertPatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/willhaben/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/willhaben/ads/HideAdsPatch.kt index 0a95eb126..1213b4bf9 100644 --- a/patches/src/main/kotlin/app/revanced/patches/willhaben/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/willhaben/ads/HideAdsPatch.kt @@ -1,10 +1,11 @@ package app.revanced.patches.willhaben.ads -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch( +@Suppress("unused") +val hideAdsPatch = bytecodePatch( + name = "Hide ads", description = "Hides all in-app ads.", ) { compatibleWith("at.willhaben") diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt index 9ee03d066..6de6152be 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.instructions import app.revanced.patcher.extensions.replaceInstruction import app.revanced.patcher.extensions.wideLiteral -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -61,8 +61,9 @@ private val hideAdsResourcePatch = resourcePatch { } } -@Suppress("unused", "ObjectPropertyName") -val `Hide ads` by creatingBytecodePatch( +@Suppress("unused") +val hideAdsPatch = bytecodePatch( + name = "Hide ads", description = "Adds options to remove general ads.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt index ccde361f9..5ad8b5da7 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.ad.video import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -12,7 +12,8 @@ import app.revanced.patches.youtube.misc.settings.PreferenceScreen import app.revanced.patches.youtube.misc.settings.settingsPatch @Suppress("ObjectPropertyName") -val `Video ads` by creatingBytecodePatch( +val videoAdsPatch = bytecodePatch( + name = "Video ads", description = "Adds an option to remove ads in the video player.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlPatch.kt index 6b6d40225..18656fa5c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.interaction.copyvideourl -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -40,8 +40,9 @@ private val copyVideoUrlResourcePatch = resourcePatch { } } -@Suppress("unused", "ObjectPropertyName") -val `Copy video URL` by creatingBytecodePatch( +@Suppress("unused") +val copyVideoURLPatch = bytecodePatch( + name = "Copy video URL", description = "Adds options to display buttons in the video player to copy video URLs.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt index 9cd87bdf7..a0da1ff73 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.interaction.dialog import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -14,8 +14,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/RemoveViewerDiscretionDialogPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Remove viewer discretion dialog` by creatingBytecodePatch( +@Suppress("unused") +val removeViewerDiscretionDialogPatch = bytecodePatch( + name = "Remove viewer discretion dialog", description = "Adds an option to remove the dialog that appears when opening a video that has been age-restricted " + "by accepting it automatically. This does not bypass the age restriction.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/doubletap/DisableChapterSkipDoubleTapPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/doubletap/DisableChapterSkipDoubleTapPatch.kt index 258e8b108..e8b244601 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/doubletap/DisableChapterSkipDoubleTapPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/doubletap/DisableChapterSkipDoubleTapPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.interaction.doubletap import app.revanced.patcher.* import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -18,8 +18,9 @@ import java.util.logging.Logger private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisableDoubleTapActionsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable double tap actions` by creatingBytecodePatch( +@Suppress("unused") +val disableDoubleTapActionsPatch = bytecodePatch( + name = "Disable double tap actions", description = "Adds an option to disable player double tap gestures.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt index 83d466ff2..e18ef3d40 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.interaction.downloads import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructionsWithLabels -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -60,7 +60,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/ internal const val BUTTON_DESCRIPTOR = "Lapp/revanced/extension/youtube/videoplayer/ExternalDownloadButton;" @Suppress("unused") -val Downloads by creatingBytecodePatch( +val Downloads = bytecodePatch( description = "Adds support to download videos with an external downloader app " + "using the in-app download button or a video player action button.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/SeekbarPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/SeekbarPatch.kt index 49b8abc47..c3fe162a5 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/SeekbarPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/SeekbarPatch.kt @@ -1,20 +1,20 @@ package app.revanced.patches.youtube.interaction.seekbar -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch @Suppress("unused") -val Seekbar by creatingBytecodePatch( +val Seekbar = bytecodePatch( description = "Adds options to disable precise seeking when swiping up on the seekbar, " + - "slide to seek instead of playing at 2x speed when pressing and holding, " + - "tapping the player seekbar to seek, " + - "and hiding the video player seekbar." + "slide to seek instead of playing at 2x speed when pressing and holding, " + + "tapping the player seekbar to seek, " + + "and hiding the video player seekbar.", ) { dependsOn( disablePreciseSeekingGesturePatch, enableSlideToSeekPatch, enableSeekbarTappingPatch, hideSeekbarPatch, - seekbarThumbnailsPatch + seekbarThumbnailsPatch, ) compatibleWith( @@ -23,6 +23,6 @@ val Seekbar by creatingBytecodePatch( "20.14.43", "20.21.37", "20.31.40", - ) + ), ) } diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsPatch.kt index 881c0eec5..6f1fbcfeb 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.interaction.swipecontrols import app.revanced.patcher.classDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -88,8 +88,9 @@ private val swipeControlsResourcePatch = resourcePatch { } } -@Suppress("unused", "ObjectPropertyName") -val `Swipe controls` by creatingBytecodePatch( +@Suppress("unused") +val swipeControlsPatch = bytecodePatch( + name = "Swipe controls", description = "Adds options to enable and configure volume and brightness swipe controls.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt index 355cd56a1..bc67ed397 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.autocaptions import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -12,8 +12,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisableAutoCaptionsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable auto captions` by creatingBytecodePatch( +@Suppress("unused") +val disableAutoCaptionsPatch = bytecodePatch( + name = "Disable auto captions", description = "Adds an option to disable captions from being automatically enabled.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt index e8cfd70d0..97eb235c6 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt @@ -5,7 +5,7 @@ import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.wideLiteral import app.revanced.patcher.patch.PatchException import app.revanced.patcher.patch.bytecodePatch -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.patcher.patch.stringOption import app.revanced.patcher.util.Document import app.revanced.patches.all.misc.resources.addResources @@ -93,8 +93,9 @@ private val changeHeaderBytecodePatch = bytecodePatch { } } -@Suppress("unused", "ObjectPropertyName") -val `Change header` by creatingResourcePatch( +@Suppress("unused") +val changeHeaderPatch = resourcePatch( + name = "Change header", description = "Adds an option to change the header logo in the top left corner of the app.", ) { dependsOn(addResourcesPatch, changeHeaderBytecodePatch) diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt index 6ed433706..6408c8bc5 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.buttons.action -import app.revanced.patcher.patch.creatingResourcePatch +import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.resourceMappingPatch @@ -13,8 +13,9 @@ import app.revanced.patches.youtube.misc.playservice.versionCheckPatch import app.revanced.patches.youtube.misc.settings.PreferenceScreen import java.util.logging.Logger -@Suppress("unused", "ObjectPropertyName") -val `Hide video action buttons` by creatingResourcePatch( +@Suppress("unused") +val hideVideoActionButtonsPatch = resourcePatch( + name = "Hide video action buttons", description = "Adds options to hide action buttons (such as the Download button) under videos.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt index 83830c725..133acf38b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.buttons.navigation import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference @@ -25,7 +25,8 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/NavigationButtonsPatch;" @Suppress("ObjectPropertyName") -val `Navigation buttons` by creatingBytecodePatch( +val navigationButtonsPatch = bytecodePatch( + name = "Navigation buttons", description = "Adds options to hide and change navigation buttons (such as the Shorts button).", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/overlay/HidePlayerOverlayButtonsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/overlay/HidePlayerOverlayButtonsPatch.kt index f713731a3..596909c96 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/overlay/HidePlayerOverlayButtonsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/overlay/HidePlayerOverlayButtonsPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.buttons.overlay import app.revanced.patcher.extensions.* -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.resourceMappingPatch @@ -23,7 +23,8 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/HidePlayerOverlayButtonsPatch;" @Suppress("ObjectPropertyName") -val `Hide player overlay buttons` by creatingBytecodePatch( +val hidePlayerOverlayButtonsPatch = bytecodePatch( + name = "Hide player overlay buttons", description = "Adds options to hide the player Cast, Autoplay, Captions, Previous & Next buttons, and the player " + "control buttons background.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/formfactor/ChangeFormFactorPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/formfactor/ChangeFormFactorPatch.kt index 2aea8d5c7..f0209b0ed 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/formfactor/ChangeFormFactorPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/formfactor/ChangeFormFactorPatch.kt @@ -3,11 +3,11 @@ package app.revanced.patches.youtube.layout.formfactor import app.revanced.patcher.* import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.ListPreference -import app.revanced.patches.youtube.layout.buttons.navigation.`Navigation buttons` +import app.revanced.patches.youtube.layout.buttons.navigation.navigationButtonsPatch import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch import app.revanced.patches.youtube.misc.navigation.hookNavigationButtonCreated import app.revanced.patches.youtube.misc.settings.PreferenceScreen @@ -17,15 +17,16 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/ChangeFormFactorPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Change form factor` by creatingBytecodePatch( +@Suppress("unused") +val changeFormFactorPatch = bytecodePatch( + name = "Change form factor", description = "Adds an option to change the UI appearance to a phone, tablet, or automotive device.", ) { dependsOn( sharedExtensionPatch, settingsPatch, addResourcesPatch, - `Navigation buttons`, + navigationButtonsPatch, ) compatibleWith( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndScreenCardsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndScreenCardsPatch.kt index 9d4035f7d..7cc8a67ec 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndScreenCardsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndScreenCardsPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.hide.endscreencards import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -49,8 +49,9 @@ private val hideEndScreenCardsResourcePatch = resourcePatch { private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/HideEndScreenCardsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide end screen cards` by creatingBytecodePatch( +@Suppress("unused") +val hideEndScreenCardsPatch = bytecodePatch( + name = "Hide end screen cards", description = "Adds an option to hide suggested video cards at the end of videos.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt index 6870212f0..631deb20d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreensuggestion/HideEndScreenSuggestedVideoPatch.kt @@ -5,7 +5,7 @@ import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.methodReference import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -19,8 +19,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/HideEndScreenSuggestedVideoPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide end screen suggested video` by creatingBytecodePatch( +@Suppress("unused") +val hideEndScreenSuggestedVideoPatch = bytecodePatch( + name = "Hide end screen suggested video", description = "Adds an option to hide the suggested video at the end of videos.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt index 13be827da..8d048b645 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/fullscreenambientmode/DisableFullscreenAmbientModePatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.hide.fullscreenambientmode import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -17,8 +17,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisableFullscreenAmbientModePatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable fullscreen ambient mode` by creatingBytecodePatch( +@Suppress("unused") +val disableFullscreenAmbientModePatch = bytecodePatch( + name = "Disable fullscreen ambient mode", description = "Adds an option to disable the ambient mode when in fullscreen.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt index 2b53fd698..592625c63 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.hide.general import app.revanced.patcher.MatchBuilder import app.revanced.patcher.extensions.* import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -66,8 +66,9 @@ private const val CUSTOM_FILTER_CLASS_NAME = private const val KEYWORD_FILTER_CLASS_NAME = "Lapp/revanced/extension/youtube/patches/components/KeywordContentFilter;" -@Suppress("unused", "ObjectPropertyName") -val `Hide layout components` by creatingBytecodePatch( +@Suppress("unused") +val hideLayoutComponentsPatch = bytecodePatch( + name = "Hide layout components", description = "Adds options to hide general layout components.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt index e4cac186c..da6b00d15 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt @@ -5,7 +5,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -32,8 +32,9 @@ private val hideInfocardsResourcePatch = resourcePatch { } } -@Suppress("unused", "ObjectPropertyName") -val `Hide info cards` by creatingBytecodePatch( +@Suppress("unused") +val hideInfoCardsPatch = bytecodePatch( + name = "Hide info cards", description = "Adds an option to hide info cards that creators add in the video player.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt index 360514736..3889369cd 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/player/flyoutmenupanel/HidePlayerFlyoutMenuPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.hide.player.flyoutmenupanel -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference @@ -11,8 +11,9 @@ import app.revanced.patches.youtube.misc.playertype.playerTypeHookPatch import app.revanced.patches.youtube.misc.settings.PreferenceScreen import app.revanced.patches.youtube.misc.settings.settingsPatch -@Suppress("unused", "ObjectPropertyName") -val `Hide player flyout menu items` by creatingBytecodePatch( +@Suppress("unused") +val hidePlayerFlyoutMenuItemsPatch = bytecodePatch( + name = "Hide player flyout menu items", description = "Adds options to hide menu items that appear when pressing the gear icon in the video player.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/relatedvideooverlay/HideRelatedVideoOverlayPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/relatedvideooverlay/HideRelatedVideoOverlayPatch.kt index 95e1837a4..ad93bc606 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/relatedvideooverlay/HideRelatedVideoOverlayPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/relatedvideooverlay/HideRelatedVideoOverlayPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.resourceMappingPatch @@ -16,8 +16,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/HideRelatedVideoOverlayPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide related video overlay` by creatingBytecodePatch( +@Suppress("unused") +val hideRelatedVideoOverlayPatch = bytecodePatch( + name = "Hide related video overlay", description = "Adds an option to hide the related video overlay shown when swiping up in fullscreen.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt index 466d12836..13812c922 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/rollingnumber/DisableRollingNumberAnimationPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -17,8 +17,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisableRollingNumberAnimationsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable rolling number animations` by creatingBytecodePatch( +@Suppress("unused") +val disableRollingNumberAnimationsPatch = bytecodePatch( + name = "Disable rolling number animations", description = "Adds an option to disable rolling number animations of video view count, user likes, and upload time.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt index abfe6c278..5352e91a4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt @@ -6,7 +6,7 @@ import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.wideLiteral import app.revanced.patcher.immutableClassDef import app.revanced.patcher.patch.booleanOption -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -157,8 +157,9 @@ private val hideShortsComponentsResourcePatch = resourcePatch { private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/components/ShortsFilter;" -@Suppress("unused", "ObjectPropertyName") -val `Hide Shorts components` by creatingBytecodePatch( +@Suppress("unused") +val hideShortsComponentsPatch = bytecodePatch( + name = "Hide Shorts components", description = "Adds options to hide components related to Shorts.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/signintotvpopup/DisableSignInToTvPatchPopup.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/signintotvpopup/DisableSignInToTvPatchPopup.kt index 780e01202..bd5d5eb64 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/signintotvpopup/DisableSignInToTvPatchPopup.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/signintotvpopup/DisableSignInToTvPatchPopup.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.hide.signintotvpopup import app.revanced.patcher.extensions.addInstructionsWithLabels -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.resourceMappingPatch @@ -13,8 +13,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisableSignInToTvPopupPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable sign in to TV popup` by creatingBytecodePatch( +@Suppress("unused") +val disableSignInToTVPopupPatch = bytecodePatch( + name = "Disable sign in to TV popup", description = "Adds an option to disable the popup asking to sign into a TV on the same local network.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt index 9d352fc5e..24b240232 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.hide.time import app.revanced.patcher.extensions.addInstructionsWithLabels -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -11,8 +11,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/HideTimestampPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Hide timestamp` by creatingBytecodePatch( +@Suppress("unused") +val hideTimestampPatch = bytecodePatch( + name = "Hide timestamp", description = "Adds an option to hide the timestamp in the bottom left of the video player.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatch.kt index 99c00c96f..abba11b3c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/miniplayer/MiniplayerPatch.kt @@ -8,7 +8,7 @@ import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -61,7 +61,7 @@ private val miniplayerResourcePatch = resourcePatch { private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/MiniplayerPatch;" @Suppress("unused") -val Miniplayer by creatingBytecodePatch( +val Miniplayer = bytecodePatch( description = "Adds options to change the in-app minimized player.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt index 26d94bd55..6e952f446 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.layout.panels.popup import app.revanced.patcher.extensions.addInstructionsWithLabels -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -11,8 +11,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisablePlayerPopupPanelsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable player popup panels` by creatingBytecodePatch( +@Suppress("unused") +val disablePlayerPopupPanelsPatch = bytecodePatch( + name = "Disable player popup panels", description = "Adds an option to disable panels (such as live chat) from opening automatically.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/ExitFullscreenPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/ExitFullscreenPatch.kt index 758f9515c..9f04df3c0 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/ExitFullscreenPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/ExitFullscreenPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.player.fullscreen -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.ListPreference @@ -15,8 +15,9 @@ import app.revanced.util.addInstructionsAtControlFlowLabel import app.revanced.util.indexOfFirstInstructionReversedOrThrow import com.android.tools.smali.dexlib2.Opcode -@Suppress("unused", "ObjectPropertyName") -val `Exit fullscreen` by creatingBytecodePatch( +@Suppress("unused") +val exitFullscreenPatch = bytecodePatch( + name = "Exit fullscreen", description = "Adds options to automatically exit fullscreen mode when a video reaches the end.", ) { compatibleWith( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenHookPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenHookPatch.kt index fce46c591..bcb81d383 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenHookPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenHookPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.MatchBuilder import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.patch.bytecodePatch -import app.revanced.patches.youtube.layout.shortsplayer.`Open Shorts in regular player` +import app.revanced.patches.youtube.layout.shortsplayer.openShortsInRegularPlayerPatch import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch import app.revanced.patches.youtube.misc.playservice.is_19_46_or_greater import app.revanced.patches.youtube.misc.playservice.versionCheckPatch @@ -15,8 +15,9 @@ internal const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/OpenVideosFullscreenHookPatch;" /** - * Used by both [`Open videos fullscreen`] and [`Open Shorts in regular player`]. + * Used by both [openVideosFullscreenPatch] and [openShortsInRegularPlayerPatch]. */ + internal val openVideosFullscreenHookPatch = bytecodePatch { dependsOn( sharedExtensionPatch, diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt index 76f57fc41..c1a70e42d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.player.fullscreen -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -8,8 +8,9 @@ import app.revanced.patches.youtube.misc.settings.PreferenceScreen import app.revanced.patches.youtube.misc.settings.settingsPatch import app.revanced.util.returnEarly -@Suppress("unused", "ObjectPropertyName") -val `Open videos fullscreen` by creatingBytecodePatch( +@Suppress("unused") +val openVideosFullscreenPatch = bytecodePatch( + name = "Open videos fullscreen", description = "Adds an option to open videos in full screen portrait mode.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityPatch.kt index ac1cd9c03..4160feaf3 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/overlay/CustomPlayerOverlayOpacityPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.player.overlay import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.resourceMappingPatch @@ -15,8 +15,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/CustomPlayerOverlayOpacityPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Custom player overlay opacity` by creatingBytecodePatch( +@Suppress("unused") +val customPlayerOverlayOpacityPatch = bytecodePatch( + name = "Custom player overlay opacity", description = "Adds an option to change the opacity of the video player background when player controls are visible.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt index 0f0441a48..0a37bf68e 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt @@ -6,7 +6,7 @@ import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.methodReference import app.revanced.patcher.immutableClassDef import app.revanced.patcher.patch.PatchException -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference @@ -43,7 +43,8 @@ private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/components/ReturnYouTubeDislikeFilter;" @Suppress("ObjectPropertyName") -val `Return YouTube Dislike` by creatingBytecodePatch( +val returnYouTubeDislikePatch = bytecodePatch( + name = "Return YouTube Dislike", description = "Adds an option to show the dislike count of videos with Return YouTube Dislike.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt index 8aa6ae2c1..9ac4138ab 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.searchbar import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.resourceMappingPatch @@ -24,8 +24,9 @@ import java.util.logging.Logger private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/WideSearchbarPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Wide search bar` by creatingBytecodePatch( +@Suppress("unused") +val wideSearchBarPatch = bytecodePatch( + name = "Wide search bar", description = "Adds an option to replace the search icon with a wide search bar. " + "This will hide the YouTube logo when active.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/shortsautoplay/ShortsAutoplayPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/shortsautoplay/ShortsAutoplayPatch.kt index 0ee2382a2..04941ff53 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/shortsautoplay/ShortsAutoplayPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/shortsautoplay/ShortsAutoplayPatch.kt @@ -7,7 +7,7 @@ import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.methodReference import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.shared.misc.mapping.resourceMappingPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.mutable.MutableMethod.Companion.toMutable private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/ShortsAutoplayPatch;" @Suppress("ObjectPropertyName") -val `Shorts autoplay` by creatingBytecodePatch( +val shortsAutoplayPatch = bytecodePatch( + name = "Shorts autoplay", description = "Adds options to automatically play the next Short.", ) { dependsOn( @@ -96,8 +97,8 @@ val `Shorts autoplay` by creatingBytecodePatch( findInstructionIndicesReversedOrThrow { val reference = getReference() reference?.definingClass == reelEnumClass && - reference.parameterTypes.firstOrNull() == "I" && - reference.returnType == reelEnumClass + reference.parameterTypes.firstOrNull() == "I" && + reference.returnType == reelEnumClass }.forEach { index -> val register = getInstruction(index + 1).registerA @@ -124,14 +125,14 @@ val `Shorts autoplay` by creatingBytecodePatch( // Find the first call modified by extension code above. val extensionReturnResultIndex = indexOfFirstInstructionOrThrow { opcode == Opcode.INVOKE_STATIC && - getReference()?.definingClass == EXTENSION_CLASS_DESCRIPTOR + getReference()?.definingClass == EXTENSION_CLASS_DESCRIPTOR } + 1 val enumRegister = getInstruction(extensionReturnResultIndex).registerA val getReelSequenceControllerIndex = indexOfFirstInstructionOrThrow { val reference = getReference() opcode == Opcode.IGET_OBJECT && - reference?.definingClass == definingClass && - reference.type == reelSequenceControllerMethodReference.definingClass + reference?.definingClass == definingClass && + reference.type == reelSequenceControllerMethodReference.definingClass } val getReelSequenceControllerReference = getInstruction(getReelSequenceControllerIndex).reference diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/shortsplayer/OpenShortsInRegularPlayerPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/shortsplayer/OpenShortsInRegularPlayerPatch.kt index 318dda2c2..a440bc1d5 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/shortsplayer/OpenShortsInRegularPlayerPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/shortsplayer/OpenShortsInRegularPlayerPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.resourceMappingPatch @@ -29,8 +29,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/OpenShortsInRegularPlayerPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Open Shorts in regular player` by creatingBytecodePatch( +@Suppress("unused") +val openShortsInRegularPlayerPatch = bytecodePatch( + name = "Open Shorts in regular player", description = "Adds options to open Shorts in the regular video player.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockPatch.kt index 0304b3753..ecfd45b1c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.immutableClassDef -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch @@ -111,7 +111,7 @@ private const val EXTENSION_SPONSORBLOCK_VIEW_CONTROLLER_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/sponsorblock/ui/SponsorBlockViewController;" @Suppress("unused") -val SponsorBlock by creatingBytecodePatch( +val SponsorBlock = bytecodePatch( description = "Adds options to enable and configure SponsorBlock, which can skip undesired video segments such as sponsored content.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt index c3f4d9f3e..58f2590d9 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt @@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.resourceMappingPatch @@ -24,7 +24,8 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/spoof/SpoofAppVersionPatch;" @Suppress("ObjectPropertyName") -val `Spoof app version` by creatingBytecodePatch( +val spoofAppVersionPatch = bytecodePatch( + name = "Spoof app version", description = "Adds an option to trick YouTube into thinking you are running an older version of the app. " + "This can be used to restore old UI elements and features.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startpage/ChangeStartPagePatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startpage/ChangeStartPagePatch.kt index 5a1ae50bd..dad7d40d9 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startpage/ChangeStartPagePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startpage/ChangeStartPagePatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.layout.startpage import app.revanced.patcher.extensions.addInstruction import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.ListPreference @@ -17,8 +17,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/ChangeStartPagePatch;" -@Suppress("unused", "ObjectPropertyName") -val `Change start page` by creatingBytecodePatch( +@Suppress("unused") +val changeStartPagePatch = bytecodePatch( + name = "Change start page", description = "Adds an option to set which page the app opens in instead of the homepage.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt index 6577f5b2c..44051b0b3 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.layout.startupshortsreset import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -22,8 +22,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisableResumingStartupShortsPlayerPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable resuming Shorts on startup` by creatingBytecodePatch( +@Suppress("unused") +val disableResumingShortsOnStartupPatch = bytecodePatch( + name = "Disable resuming Shorts on startup", description = "Adds an option to disable the Shorts player from resuming on app startup when Shorts were last being watched.", ) { dependsOn( @@ -68,8 +69,8 @@ val `Disable resuming Shorts on startup` by creatingBytecodePatch( userWasInShortsLegacyMethod.apply { val listenableInstructionIndex = indexOfFirstInstructionOrThrow { opcode == Opcode.INVOKE_INTERFACE && - getReference()?.definingClass == "Lcom/google/common/util/concurrent/ListenableFuture;" && - getReference()?.name == "isDone" + getReference()?.definingClass == "Lcom/google/common/util/concurrent/ListenableFuture;" && + getReference()?.name == "isDone" } val freeRegister = findFreeRegister(listenableInstructionIndex) diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt index 14534c41a..bc4c213cf 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.thumbnails -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.ListPreference @@ -19,8 +19,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/AlternativeThumbnailsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Alternative thumbnails` by creatingBytecodePatch( +@Suppress("unused") +val alternativeThumbnailsPatch = bytecodePatch( + name = "Alternative thumbnails", description = "Adds options to replace video thumbnails using the DeArrow API or image captures from the video.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/BypassImageRegionRestrictionsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/BypassImageRegionRestrictionsPatch.kt index eaef4528e..566a9069c 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/BypassImageRegionRestrictionsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/BypassImageRegionRestrictionsPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.layout.thumbnails -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -13,8 +13,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/BypassImageRegionRestrictionsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Bypass image region restrictions` by creatingBytecodePatch( +@Suppress("unused") +val bypassImageRegionRestrictionsPatch = bytecodePatch( + name = "Bypass image region restrictions", description = "Adds an option to use a different host for user avatar and channel images " + "and can fix missing images that are blocked in some countries.", ) { diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/announcements/AnnouncementsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/announcements/AnnouncementsPatch.kt index 921612455..c4e3d59ed 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/announcements/AnnouncementsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/announcements/AnnouncementsPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.announcements import app.revanced.patcher.extensions.addInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -13,7 +13,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/announcements/AnnouncementsPatch;" @Suppress("unused") -val Announcements by creatingBytecodePatch( +val Announcements = bytecodePatch( description = "Adds an option to show announcements from ReVanced on app startup.", ) { dependsOn( @@ -27,7 +27,7 @@ val Announcements by creatingBytecodePatch( "20.14.43", "20.21.37", "20.31.40", - ) + ), ) apply { diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/backgroundplayback/BackgroundPlaybackPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/backgroundplayback/BackgroundPlaybackPatch.kt index 5105d71d8..8da25477b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/backgroundplayback/BackgroundPlaybackPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/backgroundplayback/BackgroundPlaybackPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.backgroundplayback import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.instructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.mapping.ResourceType @@ -26,8 +26,9 @@ internal var prefBackgroundAndOfflineCategoryId = -1L private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/BackgroundPlaybackPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Remove background playback restrictions` by creatingBytecodePatch( +@Suppress("unused") +val removeBackgroundPlaybackRestrictionsPatch = bytecodePatch( + name = "Remove background playback restrictions", description = "Removes restrictions on background playback, including playing kids videos in the background.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt index e24b03350..546e3836d 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/dimensions/spoof/SpoofDeviceDimensionsPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.misc.dimensions.spoof import app.revanced.patcher.classDef import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.firstMutableMethod -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -14,8 +14,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/spoof/SpoofDeviceDimensionsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Spoof device dimensions` by creatingBytecodePatch( +@Suppress("unused") +val spoofDeviceDimensionsPatch = bytecodePatch( + name = "Spoof device dimensions", description = "Adds an option to spoof the device dimensions which can unlock higher video qualities.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/dns/CheckWatchHistoryDomainNameResolutionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/dns/CheckWatchHistoryDomainNameResolutionPatch.kt index 3266d228b..2824056d4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/dns/CheckWatchHistoryDomainNameResolutionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/dns/CheckWatchHistoryDomainNameResolutionPatch.kt @@ -8,7 +8,7 @@ import app.revanced.patches.youtube.shared.mainActivityOnCreateMethod val checkWatchHistoryDomainNameResolutionPatch = checkWatchHistoryDomainNameResolutionPatch( block = { dependsOn( - sharedExtensionPatch + sharedExtensionPatch, ) compatibleWith( @@ -17,8 +17,8 @@ val checkWatchHistoryDomainNameResolutionPatch = checkWatchHistoryDomainNameReso "20.14.43", "20.21.37", "20.31.40", - ) + ), ) }, - getMainActivityMethod = BytecodePatchContext::mainActivityOnCreateMethod::get + getMainActivityMethod = BytecodePatchContext::mainActivityOnCreateMethod::get, ) diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt index 7ddf45c9f..c3e65f2c5 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/gms/GmsCoreSupportPatch.kt @@ -8,7 +8,7 @@ import app.revanced.patches.shared.castContextFetchMethod import app.revanced.patches.shared.misc.gms.gmsCoreSupportPatch import app.revanced.patches.shared.misc.settings.preference.IntentPreference import app.revanced.patches.shared.primeMethod -import app.revanced.patches.youtube.layout.buttons.overlay.`Hide player overlay buttons` +import app.revanced.patches.youtube.layout.buttons.overlay.hidePlayerOverlayButtonsPatch import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch import app.revanced.patches.youtube.misc.gms.Constants.REVANCED_YOUTUBE_PACKAGE_NAME import app.revanced.patches.youtube.misc.gms.Constants.YOUTUBE_PACKAGE_NAME @@ -28,7 +28,7 @@ val gmsCoreSupportPatch = gmsCoreSupportPatch( gmsCoreSupportResourcePatchFactory = ::gmsCoreSupportResourcePatch, ) { dependsOn( - `Hide player overlay buttons`, // Hide non-functional cast button. + hidePlayerOverlayButtonsPatch, // Hide non-functional cast button. spoofVideoStreamsPatch, ) diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/hapticfeedback/DisableHapticFeedbackPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/hapticfeedback/DisableHapticFeedbackPatch.kt index 39b94c00d..95f7b428e 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/hapticfeedback/DisableHapticFeedbackPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/hapticfeedback/DisableHapticFeedbackPatch.kt @@ -3,7 +3,7 @@ package app.revanced.patches.youtube.misc.hapticfeedback import app.revanced.patcher.extensions.ExternalLabel import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.getInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference @@ -14,8 +14,9 @@ import app.revanced.patches.youtube.misc.settings.settingsPatch private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisableHapticFeedbackPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable haptic feedback` by creatingBytecodePatch( +@Suppress("unused") +val disableHapticFeedbackPatch = bytecodePatch( + name = "Disable haptic feedback", description = "Adds an option to disable haptic feedback in the player for various actions.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt index f1c8a5ed2..f1b0ee994 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/BypassURLRedirectsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.misc.links import app.revanced.patcher.extensions.getInstruction import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -14,8 +14,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/BypassURLRedirectsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Bypass URL redirects` by creatingBytecodePatch( +@Suppress("unused") +val bypassURLRedirectsPatch = bytecodePatch( + name = "Bypass URL redirects", description = "Adds an option to bypass URL redirects and open the original URL directly.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt index 1a4725025..613280107 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt @@ -1,7 +1,7 @@ package app.revanced.patches.youtube.misc.links import app.revanced.patcher.extensions.addInstructions -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.transformation.transformInstructionsPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -10,8 +10,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.reference.StringReference -@Suppress("unused", "ObjectPropertyName") -val `Open links externally` by creatingBytecodePatch( +@Suppress("unused") +val openLinksExternallyPatch = bytecodePatch( + name = "Open links externally", description = "Adds an option to always open links in your browser instead of the in-app browser.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/loopvideo/LoopVideoPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/loopvideo/LoopVideoPatch.kt index afe8ad9e5..1c70aa973 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/loopvideo/LoopVideoPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/loopvideo/LoopVideoPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.misc.loopvideo -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.shared.misc.settings.preference.SwitchPreference @@ -16,7 +16,8 @@ import com.android.tools.smali.dexlib2.Opcode private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/LoopVideoPatch;" @Suppress("ObjectPropertyName") -val `Loop video` by creatingBytecodePatch( +val loopVideoPatch = bytecodePatch( + name = "Loop video", description = "Adds an option to loop videos and display loop video button in the video player.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/spoof/SpoofVideoStreamsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/spoof/SpoofVideoStreamsPatch.kt index c0a31d47b..428d55af7 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/misc/spoof/SpoofVideoStreamsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/misc/spoof/SpoofVideoStreamsPatch.kt @@ -37,13 +37,13 @@ val spoofVideoStreamsPatch = spoofVideoStreamsPatch( "20.14.43", "20.21.37", "20.31.40", - ) + ), ) dependsOn( userAgentClientSpoofPatch, settingsPatch, - versionCheckPatch + versionCheckPatch, ) }, @@ -61,12 +61,12 @@ val spoofVideoStreamsPatch = spoofVideoStreamsPatch( // Requires a key and title but the actual text is chosen at runtime. key = "revanced_spoof_video_streams_about", summaryKey = null, - tag = "app.revanced.extension.youtube.settings.preference.SpoofStreamingDataSideEffectsPreference" + tag = "app.revanced.extension.youtube.settings.preference.SpoofStreamingDataSideEffectsPreference", ), SwitchPreference("revanced_spoof_video_streams_av1"), SwitchPreference("revanced_spoof_streaming_data_stats_for_nerds"), - ) - ) + ), + ), ) - } + }, ) diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/video/audio/ForceOriginalAudioPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/video/audio/ForceOriginalAudioPatch.kt index 94761f9ff..90fbbe740 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/video/audio/ForceOriginalAudioPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/video/audio/ForceOriginalAudioPatch.kt @@ -15,7 +15,7 @@ val forceOriginalAudioPatch = forceOriginalAudioPatch( dependsOn( sharedExtensionPatch, settingsPatch, - versionCheckPatch + versionCheckPatch, ) compatibleWith( @@ -24,7 +24,7 @@ val forceOriginalAudioPatch = forceOriginalAudioPatch( "20.14.43", "20.21.37", "20.31.40", - ) + ), ) }, fixUseLocalizedAudioTrackFlag = { is_20_07_or_greater }, diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/video/codecs/DisableVideoCodecsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/video/codecs/DisableVideoCodecsPatch.kt index d26ff093f..de45b8cc6 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/video/codecs/DisableVideoCodecsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/video/codecs/DisableVideoCodecsPatch.kt @@ -2,7 +2,7 @@ package app.revanced.patches.youtube.video.codecs import app.revanced.patcher.extensions.addInstructionsWithLabels import app.revanced.patcher.extensions.replaceInstruction -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.all.misc.resources.addResources import app.revanced.patches.all.misc.resources.addResourcesPatch import app.revanced.patches.all.misc.transformation.transformInstructionsPatch @@ -16,8 +16,9 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisableVideoCodecsPatch;" -@Suppress("unused", "ObjectPropertyName") -val `Disable video codecs` by creatingBytecodePatch( +@Suppress("unused") +val disableVideoCodecsPatch = bytecodePatch( + name = "Disable video codecs", description = "Adds options to disable HDR and VP9 codecs.", ) { dependsOn( diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/video/quality/VideoQualityPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/video/quality/VideoQualityPatch.kt index 1963c4b38..bc5639098 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/video/quality/VideoQualityPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/video/quality/VideoQualityPatch.kt @@ -1,6 +1,6 @@ package app.revanced.patches.youtube.video.quality -import app.revanced.patcher.patch.creatingBytecodePatch +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patches.shared.misc.settings.preference.BasePreference import app.revanced.patches.shared.misc.settings.preference.PreferenceCategory import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference.Sorting @@ -11,8 +11,9 @@ import app.revanced.patches.youtube.misc.settings.PreferenceScreen */ internal val settingsMenuVideoQualityGroup = mutableSetOf() -@Suppress("unused", "ObjectPropertyName") -val `Video quality` by creatingBytecodePatch( +@Suppress("unused") +val videoQualityPatch = bytecodePatch( + name = "Video quality", description = "Adds options to set default video qualities and always use the advanced video quality menu.", ) { dependsOn(