docs: Correct API usage of fingerprints

This commit is contained in:
oSumAtrIX 2025-03-10 13:47:55 +01:00 committed by GitHub
parent e4e66b0d8b
commit 509ecc81e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,14 +85,14 @@ val disableAdsPatch = bytecodePatch(
// Business logic of the patch to disable ads in the app. // Business logic of the patch to disable ads in the app.
execute { execute {
// Fingerprint to find the method to patch. // Fingerprint to find the method to patch.
val showAdsMatch by showAdsFingerprint { val showAdsFingerprint = fingerprint {
// More about fingerprints on the next page of the documentation. // More about fingerprints on the next page of the documentation.
} }
// In the method that shows ads, // In the method that shows ads,
// call DisableAdsPatch.shouldDisableAds() from the extension (precompiled DEX file) // call DisableAdsPatch.shouldDisableAds() from the extension (precompiled DEX file)
// to enable or disable ads. // to enable or disable ads.
showAdsMatch.method.addInstructions( showAdsFingerprint.method.addInstructions(
0, 0,
""" """
invoke-static {}, LDisableAdsPatch;->shouldDisableAds()Z invoke-static {}, LDisableAdsPatch;->shouldDisableAds()Z