From aed1eac3157317acf87f522750cf2f41509606c3 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 23 Oct 2023 01:32:28 +0200 Subject: [PATCH] fix: Only allow setting `MethodFingerprint#result` privately BREAKING CHANGE: The `MethodFingerprint#result` member can now only be set inside `MethodFingerprint`. --- api/revanced-patcher.api | 1 - .../kotlin/app/revanced/patcher/fingerprint/MethodFingerprint.kt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/api/revanced-patcher.api b/api/revanced-patcher.api index 82bddc5..2047f55 100644 --- a/api/revanced-patcher.api +++ b/api/revanced-patcher.api @@ -178,7 +178,6 @@ public abstract class app/revanced/patcher/fingerprint/MethodFingerprint { public final fun getResult ()Lapp/revanced/patcher/fingerprint/MethodFingerprintResult; public final fun resolve (Lapp/revanced/patcher/data/BytecodeContext;Lcom/android/tools/smali/dexlib2/iface/ClassDef;)Z public final fun resolve (Lapp/revanced/patcher/data/BytecodeContext;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/ClassDef;)Z - public final fun setResult (Lapp/revanced/patcher/fingerprint/MethodFingerprintResult;)V } public final class app/revanced/patcher/fingerprint/MethodFingerprint$Companion { diff --git a/src/main/kotlin/app/revanced/patcher/fingerprint/MethodFingerprint.kt b/src/main/kotlin/app/revanced/patcher/fingerprint/MethodFingerprint.kt index 8fef8e4..a2e0e3f 100644 --- a/src/main/kotlin/app/revanced/patcher/fingerprint/MethodFingerprint.kt +++ b/src/main/kotlin/app/revanced/patcher/fingerprint/MethodFingerprint.kt @@ -40,6 +40,7 @@ abstract class MethodFingerprint( * The result of the [MethodFingerprint]. */ var result: MethodFingerprintResult? = null + private set /** * Resolve a [MethodFingerprint] using the lookup map built by [initializeLookupMaps].