refactor: Include class of method in call expression

This commit is contained in:
oSumAtrIX 2023-11-03 23:31:00 +01:00
parent 671aa6d507
commit 12c43072cb
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
2 changed files with 4 additions and 5 deletions

View file

@ -2,8 +2,7 @@ package app.revanced.patcher
import app.revanced.patcher.PatchBundleLoader.Utils.getInstance import app.revanced.patcher.PatchBundleLoader.Utils.getInstance
import app.revanced.patcher.data.ResourceContext import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.fingerprint.LookupMap.Maps.clearLookupMaps import app.revanced.patcher.fingerprint.LookupMap
import app.revanced.patcher.fingerprint.LookupMap.Maps.initializeLookupMaps
import app.revanced.patcher.fingerprint.MethodFingerprint.Companion.resolveUsingLookupMap import app.revanced.patcher.fingerprint.MethodFingerprint.Companion.resolveUsingLookupMap
import app.revanced.patcher.patch.* import app.revanced.patcher.patch.*
import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.flow
@ -188,7 +187,7 @@ class Patcher(
if (context.bytecodeContext.integrations.merge) context.bytecodeContext.integrations.flush() 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. // Prevent from decoding the app manifest twice if it is not needed.
if (options.resourceDecodingMode == ResourceContext.ResourceDecodingMode.FULL) 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. * Compile and save the patched APK file.

View file

@ -93,7 +93,7 @@ internal class LookupMap : MutableMap<String, LookupMap.MethodClassList> by muta
} }
/** /**
* Clears the internal lookup maps created in [initializeLookupMaps] * Clears the internal lookup maps created in [initializeLookupMaps].
*/ */
internal fun clearLookupMaps() { internal fun clearLookupMaps() {
methods.clear() methods.clear()