dash bugfix: save the LTK but don't log it

This commit is contained in:
Andrei Vereha 2021-11-30 23:50:45 +01:00
parent 3758897bea
commit 9d1267e90d

View file

@ -678,8 +678,9 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
private fun store() {
try {
val cleanPodState = podState.copy(ltk = byteArrayOf()) // do not log ltk
val serialized = Gson().toJson(cleanPodState)
logger.debug(LTag.PUMP, "Storing Pod state: $serialized")
logger.debug(LTag.PUMP, "Storing Pod state: ${Gson().toJson(cleanPodState)}")
val serialized = Gson().toJson(podState)
sharedPreferences.putString(R.string.key_omnipod_dash_pod_state, serialized)
} catch (ex: Exception) {
logger.error(LTag.PUMP, "Failed to store Pod state", ex)