Replace override function by default in BGSourceInterface

This commit is contained in:
Philoul 2020-10-19 21:03:10 +02:00
parent a548b9c55c
commit 6fe1a4ab1f
8 changed files with 3 additions and 30 deletions

View file

@ -145,10 +145,6 @@ class DexcomPlugin @Inject constructor(
} }
} }
override fun getSensorBatteryLevel(): Int {
return -1
}
companion object { companion object {
private val PACKAGE_NAMES = arrayOf("com.dexcom.cgm.region1.mgdl", "com.dexcom.cgm.region1.mmol", private val PACKAGE_NAMES = arrayOf("com.dexcom.cgm.region1.mgdl", "com.dexcom.cgm.region1.mmol",
"com.dexcom.cgm.region2.mgdl", "com.dexcom.cgm.region2.mmol", "com.dexcom.cgm.region2.mgdl", "com.dexcom.cgm.region2.mmol",

View file

@ -45,8 +45,4 @@ class GlimpPlugin @Inject constructor(
bgReading.raw = 0.0 bgReading.raw = 0.0
MainApp.getDbHelper().createIfNotExists(bgReading, "GLIMP") MainApp.getDbHelper().createIfNotExists(bgReading, "GLIMP")
} }
override fun getSensorBatteryLevel(): Int {
return -1
}
} }

View file

@ -65,8 +65,4 @@ class MM640gPlugin @Inject constructor(
} }
} }
} }
override fun getSensorBatteryLevel(): Int {
return -1
}
} }

View file

@ -91,8 +91,4 @@ class NSClientSourcePlugin @Inject constructor(
lastBGTimeStamp = timeStamp lastBGTimeStamp = timeStamp
} }
} }
override fun getSensorBatteryLevel(): Int {
return -1
}
} }

View file

@ -69,8 +69,4 @@ class PoctechPlugin @Inject constructor(
aapsLogger.error("Exception: ", e) aapsLogger.error("Exception: ", e)
} }
} }
override fun getSensorBatteryLevel(): Int {
return -1
}
} }

View file

@ -100,9 +100,4 @@ class RandomBgPlugin @Inject constructor(
} }
aapsLogger.debug(LTag.BGSOURCE, "Generated BG: $bgReading") aapsLogger.debug(LTag.BGSOURCE, "Generated BG: $bgReading")
} }
override fun getSensorBatteryLevel(): Int {
return -1
}
} }

View file

@ -53,8 +53,4 @@ class TomatoPlugin @Inject constructor(
nsUpload.sendToXdrip(bgReading) nsUpload.sendToXdrip(bgReading)
} }
} }
override fun getSensorBatteryLevel(): Int {
return -1
}
} }

View file

@ -10,5 +10,7 @@ public interface BgSourceInterface {
void handleNewData(Intent intent); void handleNewData(Intent intent);
int getSensorBatteryLevel(); default int getSensorBatteryLevel() {
return -1;
}
} }