From 50ffebc679ded320e0aeeea7745362189028d192 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 25 Jun 2018 23:02:58 +0200 Subject: [PATCH] BgReading.copyFrom: don't update local data. Like the 'valid' flag, which is not copied and is not synced with NS, don't sync sourcePlugin or isFiltered. Otherwise there might be a race condition if the NS-roundtrip of a locally received BG updates the sourcePlugin field to null, thus leaving no values for the loop to loop with. --- app/src/main/java/info/nightscout/androidaps/db/BgReading.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/db/BgReading.java b/app/src/main/java/info/nightscout/androidaps/db/BgReading.java index 0a936f23d8..d7ebfdc677 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/BgReading.java +++ b/app/src/main/java/info/nightscout/androidaps/db/BgReading.java @@ -152,8 +152,6 @@ public class BgReading implements DataPointWithLabelInterface { raw = other.raw; direction = other.direction; _id = other._id; - sourcePlugin = other.sourcePlugin; - isFiltered = other.isFiltered; } // ------------------ DataPointWithLabelInterface ------------------