mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-01 13:44:25 +02:00
perf(fingerprint): do not resolve already resolved fingerprints
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
2f7e62ef65
commit
4bfd7ebff8
@ -50,11 +50,13 @@ object MethodFingerprintUtils {
|
|||||||
* @param context The context on which to resolve the [MethodFingerprint].
|
* @param context The context on which to resolve the [MethodFingerprint].
|
||||||
* @param classDef The class of the matching [Method].
|
* @param classDef The class of the matching [Method].
|
||||||
* @param forData The [BytecodeData] to host proxies.
|
* @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 {
|
fun MethodFingerprint.resolve(forData: BytecodeData, context: Method, classDef: ClassDef): Boolean {
|
||||||
val methodFingerprint = this
|
val methodFingerprint = this
|
||||||
|
|
||||||
|
if (methodFingerprint.result != null) return true
|
||||||
|
|
||||||
if (methodFingerprint.returnType != null && !context.returnType.startsWith(methodFingerprint.returnType))
|
if (methodFingerprint.returnType != null && !context.returnType.startsWith(methodFingerprint.returnType))
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user