Fix detecting BG source from NS entry.

This commit is contained in:
Johannes Mockenhaupt 2018-06-23 11:27:56 +02:00
parent b4db98fa1d
commit c18effd893
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -68,7 +68,7 @@ public class SourceNSClientPlugin extends PluginBase implements BgSourceInterfac
BgReading bgReading = new BgReading(new NSSgv(sgvJson));
String sourceDescription = JsonHelper.safeGetString(sgvJson, "device");
bgReading.filtered = sourceDescription != null
&& (sourceDescription.equals("G5 Native") || sourceDescription.equals("AndroidAPS-DexcomG5"));
&& (sourceDescription.contains("G5 Native") || sourceDescription.contains("AndroidAPS-DexcomG5"));
bgReading.sourcePlugin = getName();
boolean isNew = MainApp.getDbHelper().createIfNotExists(bgReading, getName());
if (isNew) {