commit
ba4a8f3a1d
1 changed files with 2 additions and 0 deletions
|
@ -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<String, MutableList<PumpDbEntry>>
|
||||
|
||||
aapsLogger.debug(LTag.PUMP, String.format("Loading Pump Sync Storage: boluses=%d, tbrs=%d.", pumpSyncStorage[BOLUS]!!.size, pumpSyncStorage[TBR]!!.size))
|
||||
|
|
Loading…
Reference in a new issue