fix: device spoof global state

This commit is contained in:
rhunk
2023-08-01 01:23:57 +02:00
parent 1e02e0a61c
commit e2249417eb
2 changed files with 2 additions and 1 deletions

View File

@ -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)
}

View File

@ -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