From 12c43072cbeff3c30897b8b4023d5cc07047f782 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 3 Nov 2023 23:31:00 +0100 Subject: [PATCH] refactor: Include class of method in call expression --- src/main/kotlin/app/revanced/patcher/Patcher.kt | 7 +++---- .../kotlin/app/revanced/patcher/fingerprint/LookupMap.kt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/app/revanced/patcher/Patcher.kt b/src/main/kotlin/app/revanced/patcher/Patcher.kt index 11d700b..39ee730 100644 --- a/src/main/kotlin/app/revanced/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/patcher/Patcher.kt @@ -2,8 +2,7 @@ package app.revanced.patcher import app.revanced.patcher.PatchBundleLoader.Utils.getInstance import app.revanced.patcher.data.ResourceContext -import app.revanced.patcher.fingerprint.LookupMap.Maps.clearLookupMaps -import app.revanced.patcher.fingerprint.LookupMap.Maps.initializeLookupMaps +import app.revanced.patcher.fingerprint.LookupMap import app.revanced.patcher.fingerprint.MethodFingerprint.Companion.resolveUsingLookupMap import app.revanced.patcher.patch.* import kotlinx.coroutines.flow.flow @@ -188,7 +187,7 @@ class Patcher( if (context.bytecodeContext.integrations.merge) context.bytecodeContext.integrations.flush() - initializeLookupMaps(context.bytecodeContext) + LookupMap.initializeLookupMaps(context.bytecodeContext) // Prevent from decoding the app manifest twice if it is not needed. if (options.resourceDecodingMode == ResourceContext.ResourceDecodingMode.FULL) @@ -250,7 +249,7 @@ class Patcher( } } - override fun close() = clearLookupMaps() + override fun close() = LookupMap.clearLookupMaps() /** * Compile and save the patched APK file. diff --git a/src/main/kotlin/app/revanced/patcher/fingerprint/LookupMap.kt b/src/main/kotlin/app/revanced/patcher/fingerprint/LookupMap.kt index a0adadf..80847e7 100644 --- a/src/main/kotlin/app/revanced/patcher/fingerprint/LookupMap.kt +++ b/src/main/kotlin/app/revanced/patcher/fingerprint/LookupMap.kt @@ -93,7 +93,7 @@ internal class LookupMap : MutableMap by muta } /** - * Clears the internal lookup maps created in [initializeLookupMaps] + * Clears the internal lookup maps created in [initializeLookupMaps]. */ internal fun clearLookupMaps() { methods.clear()