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)
|
||||
omnipodPumpStatus.podAvailable = false
|
||||
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_lot.text = "-"
|
||||
omnipod_pod_tid.text = "-"
|
||||
|
|
|
@ -622,19 +622,20 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
|
|||
|
||||
setRefreshButtonEnabled(false);
|
||||
|
||||
try {
|
||||
PodStateManager podStateManager = omnipodUtil.getPodStateManager();
|
||||
} catch(Exception ex) {
|
||||
omnipodUtil.setDriverState(OmnipodDriverState.Initalized_NoPod);
|
||||
throw ex;
|
||||
}
|
||||
if (podStateManager.isPaired()) {
|
||||
aapsLogger.debug(LTag.PUMP, "PodStateManager (saved): " + podStateManager);
|
||||
|
||||
if (!isRefresh) {
|
||||
pumpState = PumpDriverState.Initialized;
|
||||
}
|
||||
|
||||
// TODO handle if pod state too old
|
||||
// TODO handle if session state too old
|
||||
getPodPumpStatus();
|
||||
} else {
|
||||
aapsLogger.debug(LTag.PUMP, "No Pod running");
|
||||
omnipodUtil.setDriverState(OmnipodDriverState.Initalized_NoPod);
|
||||
}
|
||||
|
||||
finishAction("Omnipod Pump");
|
||||
|
||||
|
|
Loading…
Reference in a new issue