MedtronicFragment synchronized

This commit is contained in:
Milos Kozak 2019-08-15 17:11:07 +02:00
parent 1cb93c630d
commit bfedc3d9d7

View file

@ -111,6 +111,7 @@ class MedtronicFragment : Fragment() {
updateGUI()
}
@Synchronized
override fun onResume() {
super.onResume()
MainApp.bus().register(this)
@ -142,6 +143,7 @@ class MedtronicFragment : Fragment() {
}, { FabricPrivacy.logException(it) })
}
@Synchronized
override fun onPause() {
super.onPause()
disposable.clear()
@ -249,7 +251,9 @@ class MedtronicFragment : Fragment() {
}
// GUI functions
@Synchronized
fun updateGUI() {
if (medtronic_rl_status == null) return
val plugin = MedtronicPumpPlugin.getPlugin()
val pumpStatus = MedtronicUtil.getPumpStatus()