Fix build after 2.6.0 merge

This commit is contained in:
Bart Sopers 2020-03-03 22:03:04 +01:00
parent 3eea2598f2
commit 3c8c3efb43
4 changed files with 12 additions and 15 deletions

View file

@ -24,6 +24,7 @@ import java.util.Set;
import info.nightscout.androidaps.BuildConfig; import info.nightscout.androidaps.BuildConfig;
import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
import info.nightscout.androidaps.activities.ErrorHelperActivity;
import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult; import info.nightscout.androidaps.data.PumpEnactResult;
@ -38,7 +39,6 @@ import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction; import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
@ -292,7 +292,7 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
private void doPodCheck() { private void doPodCheck() {
if (System.currentTimeMillis() > this.nextPodCheck) { if (System.currentTimeMillis() > this.nextPodCheck) {
if (OmnipodUtil.getDriverState()==OmnipodDriverState.Initalized_NoPod) { if (OmnipodUtil.getDriverState() == OmnipodDriverState.Initalized_NoPod) {
Notification notification = new Notification(Notification.OMNIPOD_POD_NOT_ATTACHED, MainApp.gs(R.string.omnipod_error_pod_not_attached), Notification.NORMAL); Notification notification = new Notification(Notification.OMNIPOD_POD_NOT_ATTACHED, MainApp.gs(R.string.omnipod_error_pod_not_attached), Notification.NORMAL);
RxBus.INSTANCE.send(new EventNewNotification(notification)); RxBus.INSTANCE.send(new EventNewNotification(notification));
} else { } else {
@ -966,7 +966,7 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
if (isLoggingEnabled()) if (isLoggingEnabled())
LOG.warn(getLogPrefix() + "Time, Date and/or TimeZone changed. [changeType={}, eventHandlingEnabled={}]", timeChangeType.name(), pumpStatusLocal.timeChangeEventEnabled); LOG.warn(getLogPrefix() + "Time, Date and/or TimeZone changed. [changeType={}, eventHandlingEnabled={}]", timeChangeType.name(), pumpStatusLocal.timeChangeEventEnabled);
if (OmnipodUtil.getDriverState()==OmnipodDriverState.Initalized_PodAvailable) { if (OmnipodUtil.getDriverState() == OmnipodDriverState.Initalized_PodAvailable) {
if (pumpStatusLocal.timeChangeEventEnabled) { if (pumpStatusLocal.timeChangeEventEnabled) {
LOG.info(getLogPrefix() + "Time,and/or TimeZone changed event received and will be consumed by driver."); LOG.info(getLogPrefix() + "Time,and/or TimeZone changed event received and will be consumed by driver.");
this.hasTimeDateOrTimeZoneChanged = true; this.hasTimeDateOrTimeZoneChanged = true;

View file

@ -24,18 +24,17 @@ import java.util.List;
import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
import info.nightscout.androidaps.activities.NoSplashActivity; import info.nightscout.androidaps.activities.NoSplashAppCompatActivity;
import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.logging.L; import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair; import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup; import info.nightscout.androidaps.plugins.pump.common.defs.PumpHistoryEntryGroup;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil; import info.nightscout.androidaps.plugins.pump.common.utils.ProfileUtil;
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.db.PodHistory; import info.nightscout.androidaps.plugins.pump.omnipod.driver.db.PodHistory;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil; import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodUtil;
public class PodHistoryActivity extends NoSplashActivity { public class PodHistoryActivity extends NoSplashAppCompatActivity {
private static Logger LOG = LoggerFactory.getLogger(L.PUMP); private static Logger LOG = LoggerFactory.getLogger(L.PUMP);

View file

@ -8,7 +8,7 @@ import com.atech.android.library.wizardpager.data.WizardPagerSettings
import com.atech.android.library.wizardpager.defs.WizardStepsWayType import com.atech.android.library.wizardpager.defs.WizardStepsWayType
import info.nightscout.androidaps.MainApp import info.nightscout.androidaps.MainApp
import info.nightscout.androidaps.R import info.nightscout.androidaps.R
import info.nightscout.androidaps.activities.NoSplashActivity import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
import info.nightscout.androidaps.events.EventRefreshOverview import info.nightscout.androidaps.events.EventRefreshOverview
import info.nightscout.androidaps.plugins.bus.RxBus import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.pump.omnipod.defs.SetupProgress import info.nightscout.androidaps.plugins.pump.omnipod.defs.SetupProgress
@ -27,7 +27,7 @@ import kotlinx.android.synthetic.main.omnipod_pod_mgmt.*
/** /**
* Created by andy on 30/08/2019 * Created by andy on 30/08/2019
*/ */
class PodManagementActivity : NoSplashActivity() { class PodManagementActivity : NoSplashAppCompatActivity() {
private var initPodChanged = false private var initPodChanged = false
private var podSessionFullyInitalized = false private var podSessionFullyInitalized = false
@ -69,7 +69,6 @@ class PodManagementActivity : NoSplashActivity() {
} }
} }
fun initPodAction() { fun initPodAction() {
val pagerSettings = WizardPagerSettings() val pagerSettings = WizardPagerSettings()
@ -124,7 +123,7 @@ class PodManagementActivity : NoSplashActivity() {
fun resetPodAction() { fun resetPodAction() {
OKDialog.showConfirmation(this, OKDialog.showConfirmation(this,
MainApp.gs(R.string.omnipod_cmd_reset_pod_desc), Thread { MainApp.gs(R.string.omnipod_cmd_reset_pod_desc), Thread {
AapsOmnipodManager.getInstance().resetPodStatus() AapsOmnipodManager.getInstance().resetPodStatus()
OmnipodUtil.setDriverState(OmnipodDriverState.Initalized_NoPod) OmnipodUtil.setDriverState(OmnipodDriverState.Initalized_NoPod)
refreshButtons() refreshButtons()
@ -138,17 +137,16 @@ class PodManagementActivity : NoSplashActivity() {
startActivity(Intent(applicationContext, PodHistoryActivity::class.java)) startActivity(Intent(applicationContext, PodHistoryActivity::class.java))
} }
fun refreshButtons() { fun refreshButtons() {
initpod_init_pod.isEnabled = (OmnipodUtil.getPodSessionState() == null || initpod_init_pod.isEnabled = (OmnipodUtil.getPodSessionState() == null ||
OmnipodUtil.getPodSessionState().getSetupProgress().isBefore(SetupProgress.COMPLETED)) OmnipodUtil.getPodSessionState().getSetupProgress().isBefore(SetupProgress.COMPLETED))
val isPodSessionActive = (OmnipodUtil.getPodSessionState() != null) val isPodSessionActive = (OmnipodUtil.getPodSessionState() != null)
initpod_remove_pod.isEnabled = isPodSessionActive initpod_remove_pod.isEnabled = isPodSessionActive
initpod_reset_pod.isEnabled = isPodSessionActive initpod_reset_pod.isEnabled = isPodSessionActive
if (OmnipodUtil.getDriverState()==OmnipodDriverState.NotInitalized) { if (OmnipodUtil.getDriverState() == OmnipodDriverState.NotInitalized) {
// if rileylink is not running we disable all operations // if rileylink is not running we disable all operations
initpod_init_pod.isEnabled = false initpod_init_pod.isEnabled = false
initpod_remove_pod.isEnabled = false initpod_remove_pod.isEnabled = false

View file

@ -16,6 +16,7 @@ import java.util.Objects;
import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
import info.nightscout.androidaps.activities.ErrorHelperActivity;
import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult; import info.nightscout.androidaps.data.PumpEnactResult;
@ -25,7 +26,6 @@ import info.nightscout.androidaps.events.Event;
import info.nightscout.androidaps.events.EventRefreshOverview; import info.nightscout.androidaps.events.EventRefreshOverview;
import info.nightscout.androidaps.logging.L; import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
@ -524,7 +524,7 @@ public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface
LOG.debug("Reporting implicitly cancelled TBR to Treatments plugin"); LOG.debug("Reporting implicitly cancelled TBR to Treatments plugin");
} }
long time = System.currentTimeMillis()-1000; long time = System.currentTimeMillis() - 1000;
addSuccessToHistory(time, PodHistoryEntryType.CancelTemporaryBasal, null); addSuccessToHistory(time, PodHistoryEntryType.CancelTemporaryBasal, null);