diff --git a/src/main/kotlin/app/revanced/patcher/fingerprint/method/utils/MethodFingerprintUtils.kt b/src/main/kotlin/app/revanced/patcher/fingerprint/method/utils/MethodFingerprintUtils.kt index cabe8dc3..5e1aaa50 100644 --- a/src/main/kotlin/app/revanced/patcher/fingerprint/method/utils/MethodFingerprintUtils.kt +++ b/src/main/kotlin/app/revanced/patcher/fingerprint/method/utils/MethodFingerprintUtils.kt @@ -50,11 +50,13 @@ object MethodFingerprintUtils { * @param context The context on which to resolve the [MethodFingerprint]. * @param classDef The class of the matching [Method]. * @param forData The [BytecodeData] to host proxies. - * @return True if the resolution was successful, false otherwise. + * @return True if the resolution was successful or if the fingerprint is already resolved, false otherwise. */ fun MethodFingerprint.resolve(forData: BytecodeData, context: Method, classDef: ClassDef): Boolean { val methodFingerprint = this + if (methodFingerprint.result != null) return true + if (methodFingerprint.returnType != null && !context.returnType.startsWith(methodFingerprint.returnType)) return false