From e2249417eb58aec283ec2439ea92f702df1421d9 Mon Sep 17 00:00:00 2001 From: rhunk <101876869+rhunk@users.noreply.github.com> Date: Tue, 1 Aug 2023 01:23:57 +0200 Subject: [PATCH] fix: device spoof global state --- .../kotlin/me/rhunk/snapenhance/core/config/ConfigContainer.kt | 1 - .../snapenhance/features/impl/experiments/DeviceSpooferHook.kt | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/ConfigContainer.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/ConfigContainer.kt index 983695f0..c806c423 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/config/ConfigContainer.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/config/ConfigContainer.kt @@ -57,7 +57,6 @@ open class ConfigContainer( fun toJson(): JsonObject { val json = JsonObject() properties.forEach { (propertyKey, propertyValue) -> - Logger.debug("${propertyKey.name} => $propertyValue") val serializedValue = propertyValue.getNullable()?.let { propertyKey.dataProcessor.serializeAny(it) } json.add(propertyKey.name, serializedValue) } diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/experiments/DeviceSpooferHook.kt b/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/experiments/DeviceSpooferHook.kt index 7ccfecdf..5f9a4839 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/experiments/DeviceSpooferHook.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/experiments/DeviceSpooferHook.kt @@ -9,6 +9,8 @@ import me.rhunk.snapenhance.hook.Hooker class DeviceSpooferHook: Feature("device_spoofer", loadParams = FeatureLoadParams.ACTIVITY_CREATE_ASYNC) { override fun asyncOnActivityCreate() { + if (context.config.spoof.globalState != true) return + val fingerprint by context.config.spoof.device.fingerprint val androidId by context.config.spoof.device.androidId