commit e2249417eb58aec283ec2439ea92f702df1421d9
parent 1e02e0a61cd8db04fc729840c22c33ae1f0c188d
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Tue, 1 Aug 2023 01:23:57 +0200
fix: device spoof global state
Diffstat:
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
@@ -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
@@ -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