Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Migrate patches to DSL #3107

Open
wants to merge 41 commits into
base: refactor/dsl
Choose a base branch
from

Conversation

Ushie
Copy link
Member

@Ushie Ushie commented May 2, 2024

No description provided.

"invoke-static { p0 }, $INTEGRATIONS_CLASS_DESCRIPTOR->activityCreated(Landroid/app/Activity;)V"
)
}
// mainActivityResult.mutableMethod.implementation?.instructions.lastIndex = ""
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need help here

Ushie added 11 commits May 3, 2024 21:10
…refactor/dsl

# Conflicts:
#	src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/BootStateFingerprint.kt
#	src/main/kotlin/app/revanced/patches/finanzonline/detection/bootloader/fingerprints/CreateKeyFingerprint.kt
#	src/main/kotlin/app/revanced/patches/finanzonline/detection/root/fingerprints/RootDetectionFingerprint.kt
#	src/main/kotlin/app/revanced/patches/idaustria/detection/root/fingerprints/AttestationSupportedCheckFingerprint.kt
#	src/main/kotlin/app/revanced/patches/idaustria/detection/root/fingerprints/BootloaderCheckFingerprint.kt
#	src/main/kotlin/app/revanced/patches/idaustria/detection/root/fingerprints/RootCheckFingerprint.kt
#	src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/IsAdCheckOneFingerprint.kt
#	src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/IsAdCheckTwoFingerprint.kt
#	src/main/kotlin/app/revanced/patches/instagram/patches/ads/timeline/fingerprints/ShowAdFingerprint.kt
#	src/main/kotlin/app/revanced/patches/irplus/ad/fingerprints/IrplusAdsFingerprint.kt
#	src/main/kotlin/app/revanced/patches/lightroom/misc/login/fingerprints/IsLoggedInFingerprint.kt
#	src/main/kotlin/app/revanced/patches/lightroom/misc/premium/fingerprints/HasPurchasedFingerprint.kt
#	src/main/kotlin/app/revanced/patches/memegenerator/detection/license/fingerprints/LicenseValidationFingerprint.kt
#	src/main/kotlin/app/revanced/patches/memegenerator/detection/signature/fingerprints/VerifySignatureFingerprint.kt
#	src/main/kotlin/app/revanced/patches/memegenerator/misc/pro/fingerprints/IsFreeVersionFingerprint.kt
#	src/main/kotlin/app/revanced/patches/myfitnesspal/ads/fingerprints/MainActivityNavigateToNativePremiumUpsellFingerprint.kt
#	src/main/kotlin/app/revanced/patches/nfctoolsse/misc/pro/fingerprints/IsLicenseRegisteredFingerprint.kt
#	src/main/kotlin/app/revanced/patches/photomath/detection/deviceid/SpoofDeviceIdPatch.kt
#	src/main/kotlin/app/revanced/patches/photomath/misc/annoyances/HideUpdatePopupPatch.kt
#	src/main/kotlin/app/revanced/patches/photomath/misc/unlock/bookpoint/fingerprints/IsBookpointEnabledFingerprint.kt
#	src/main/kotlin/app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPatch.kt
#	src/main/kotlin/app/revanced/patches/photomath/misc/unlock/plus/fingerprints/IsPlusUnlockedFingerprint.kt
#	src/main/kotlin/app/revanced/patches/pixiv/ads/fingerprints/IsNotPremiumFingerprint.kt
object PremiumNavbarTabResourcePatch : ResourcePatch() {
internal var showBottomNavigationItemsTextId = -1L
internal var premiumTabId = -1L
internal var showBottomNavigationItemsTextId = -1L
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setter should be made private on such properties.

)

IsSwipingUpFingerprint.result?.let {
isSwipingUpResult.let {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I corrected it

)

// Find the required methods to tap the seekbar.
val seekbarTappingMethods = OnTouchEventHandlerFingerprint.result?.let {
val seekbarTappingMethods = onTouchEventHandlerResult.let {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected here as well.

val slideToSeekResult by slideToSeekFingerprint
val doubleSpeedSeekNoticeResult by doubleSpeedSeekNoticeFingerprint

val integrationsClassDescriptor = "Lapp/revanced/integrations/youtube/patches/SlideToSeekPatch;"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was decided to move this to a private (or if necessary internal) constant above the patch, because sometimes fingerprints reference it to keep it consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants