refactor: make use of named arguments

This commit is contained in:
oSumAtrIX
2022-08-31 20:37:21 +02:00
parent bcef48c8e2
commit e678115b24
93 changed files with 160 additions and 393 deletions

View File

@ -3,11 +3,7 @@ package app.revanced.patches.warnwetter.misc.firebasegetcert.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"de.dwd.warnapp", arrayOf()
)]
)
@Compatibility([Package("de.dwd.warnapp")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class FirebaseGetCertPatchCompatibility

View File

@ -14,10 +14,7 @@ import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.Firebase
@Version("0.0.1")
object GetMessagingCertFingerprint : MethodFingerprint(
"Ljava/lang/String;",
null,
null,
null,
listOf(
strings = listOf(
"ContentValues",
"Could not get fingerprint hash for package: ",
"No such package: "

View File

@ -14,10 +14,7 @@ import app.revanced.patches.warnwetter.misc.firebasegetcert.annotations.Firebase
@Version("0.0.1")
object GetReqistrationCertFingerprint : MethodFingerprint(
"Ljava/lang/String;",
null,
null,
null,
listOf(
strings = listOf(
"FirebaseRemoteConfig",
"Could not get fingerprint hash for package: ",
"No such package: "

View File

@ -3,11 +3,7 @@ package app.revanced.patches.warnwetter.misc.promocode.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"de.dwd.warnapp", arrayOf()
)]
)
@Compatibility([Package("de.dwd.warnapp")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class PromoCodeUnlockCompatibility

View File

@ -2,8 +2,8 @@ package app.revanced.patches.warnwetter.misc.promocode.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnlockCompatibility
@Name("promo-code-unlock-fingerprint")
@ -13,12 +13,7 @@ import app.revanced.patches.warnwetter.misc.promocode.annotations.PromoCodeUnloc
@PromoCodeUnlockCompatibility
@Version("0.0.1")
object PromoCodeUnlockFingerprint : MethodFingerprint(
null,
null,
null,
null,
null,
{ methodDef ->
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("PromoTokenVerification;") && methodDef.name == "isValid"
}
)