Restore accidentally removed code
This commit is contained in:
parent
62bda451a0
commit
050816ddf9
2 changed files with 13 additions and 12 deletions
|
@ -254,7 +254,7 @@ class OmnipodFragment : DaggerFragment() {
|
||||||
omnipod_pod_status.text = resourceHelper.gs(R.string.omnipod_pod_not_initalized)
|
omnipod_pod_status.text = resourceHelper.gs(R.string.omnipod_pod_not_initalized)
|
||||||
omnipodPumpStatus.podAvailable = false
|
omnipodPumpStatus.podAvailable = false
|
||||||
omnipodPumpStatus.podNumber == null
|
omnipodPumpStatus.podNumber == null
|
||||||
} else if (driverState == OmnipodDriverState.Initalized_NoPod || !omnipodPumpStatus.podStateManager.hasState()) {
|
} else if (driverState == OmnipodDriverState.Initalized_NoPod) {
|
||||||
omnipod_pod_address.text = resourceHelper.gs(R.string.omnipod_pod_name_no_info)
|
omnipod_pod_address.text = resourceHelper.gs(R.string.omnipod_pod_name_no_info)
|
||||||
omnipod_pod_lot.text = "-"
|
omnipod_pod_lot.text = "-"
|
||||||
omnipod_pod_tid.text = "-"
|
omnipod_pod_tid.text = "-"
|
||||||
|
|
|
@ -622,19 +622,20 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
|
||||||
|
|
||||||
setRefreshButtonEnabled(false);
|
setRefreshButtonEnabled(false);
|
||||||
|
|
||||||
try {
|
|
||||||
PodStateManager podStateManager = omnipodUtil.getPodStateManager();
|
PodStateManager podStateManager = omnipodUtil.getPodStateManager();
|
||||||
} catch(Exception ex) {
|
if (podStateManager.isPaired()) {
|
||||||
omnipodUtil.setDriverState(OmnipodDriverState.Initalized_NoPod);
|
aapsLogger.debug(LTag.PUMP, "PodStateManager (saved): " + podStateManager);
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isRefresh) {
|
if (!isRefresh) {
|
||||||
pumpState = PumpDriverState.Initialized;
|
pumpState = PumpDriverState.Initialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO handle if pod state too old
|
// TODO handle if session state too old
|
||||||
getPodPumpStatus();
|
getPodPumpStatus();
|
||||||
|
} else {
|
||||||
|
aapsLogger.debug(LTag.PUMP, "No Pod running");
|
||||||
|
omnipodUtil.setDriverState(OmnipodDriverState.Initalized_NoPod);
|
||||||
|
}
|
||||||
|
|
||||||
finishAction("Omnipod Pump");
|
finishAction("Omnipod Pump");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue