diff --git a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt index 0e285b6643..592674088a 100644 --- a/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt +++ b/pump-common/src/main/java/info/nightscout/androidaps/plugins/pump/common/sync/PumpSyncStorage.kt @@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.pump.common.sync import com.google.gson.Gson import com.google.gson.GsonBuilder +import com.thoughtworks.xstream.security.AnyTypePermission import com.thoughtworks.xstream.XStream import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.interfaces.PumpSync @@ -45,6 +46,7 @@ class PumpSyncStorage @Inject constructor( val jsonData: String = sp.getString(pumpSyncStorageKey, ""); if (jsonData.isNotBlank()) { + xstream.addPermission(AnyTypePermission.ANY) pumpSyncStorage = xstream.fromXML(jsonData, MutableMap::class.java) as MutableMap> aapsLogger.debug(LTag.PUMP, String.format("Loading Pump Sync Storage: boluses=%d, tbrs=%d.", pumpSyncStorage[BOLUS]!!.size, pumpSyncStorage[TBR]!!.size))