Revert "- removed dependencies to omnipod: Myprefernces, ActivitiesmOdules, AppComponent"
This reverts commit ea0b89cbf8
.
This commit is contained in:
parent
ea0b89cbf8
commit
71d5409344
6 changed files with 30 additions and 16 deletions
|
@ -300,6 +300,16 @@
|
|||
android:theme="@style/Theme.AppCompat.NoTitle" />
|
||||
<activity android:name=".plugins.pump.medtronic.dialog.MedtronicHistoryActivity" />
|
||||
|
||||
<!-- Omnipod service and activities -->
|
||||
<service
|
||||
android:name=".plugins.pump.omnipod.service.RileyLinkOmnipodService"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
|
||||
<activity android:name=".plugins.pump.omnipod.dialogs.PodManagementActivity" />
|
||||
<activity android:name=".plugins.pump.omnipod.dialogs.PodHistoryActivity" />
|
||||
<activity android:name="com.atech.android.library.wizardpager.WizardPagerActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar"/>
|
||||
|
||||
<uses-library
|
||||
android:name="org.apache.http.legacy"
|
||||
|
|
|
@ -79,6 +79,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
@Inject lateinit var loopPlugin: LoopPlugin
|
||||
@Inject lateinit var localInsightPlugin: LocalInsightPlugin
|
||||
@Inject lateinit var medtronicPumpPlugin: MedtronicPumpPlugin
|
||||
@Inject lateinit var omnipodPumpPlugin: OmnipodPumpPlugin
|
||||
@Inject lateinit var nsClientPlugin: NSClientPlugin
|
||||
@Inject lateinit var openAPSAMAPlugin: OpenAPSAMAPlugin
|
||||
@Inject lateinit var openAPSSMBPlugin: OpenAPSSMBPlugin
|
||||
|
@ -174,6 +175,7 @@ class MyPreferenceFragment : PreferenceFragmentCompat(), OnSharedPreferenceChang
|
|||
addPreferencesFromResourceIfEnabled(localInsightPlugin, rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(comboPlugin, rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(medtronicPumpPlugin, rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(omnipodPumpPlugin, rootKey, Config.PUMPDRIVERS)
|
||||
addPreferencesFromResourceIfEnabled(virtualPumpPlugin, rootKey, !Config.NSCLIENT)
|
||||
addPreferencesFromResourceIfEnabled(insulinOrefFreePeakPlugin, rootKey)
|
||||
addPreferencesFromResourceIfEnabled(nsClientPlugin, rootKey)
|
||||
|
|
|
@ -50,5 +50,7 @@ abstract class ActivitiesModule {
|
|||
@ContributesAndroidInjector abstract fun contributesStatsActivity(): StatsActivity
|
||||
@ContributesAndroidInjector abstract fun contributesSurveyActivity(): SurveyActivity
|
||||
@ContributesAndroidInjector abstract fun contributesTDDStatsActivity(): TDDStatsActivity
|
||||
@ContributesAndroidInjector abstract fun contributesPodManagementActivity(): PodManagementActivity
|
||||
@ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): PodHistoryActivity
|
||||
|
||||
}
|
|
@ -69,7 +69,8 @@ import javax.inject.Singleton
|
|||
PreferencesModule::class,
|
||||
OverviewModule::class,
|
||||
DataClassesModule::class,
|
||||
SMSModule::class
|
||||
SMSModule::class,
|
||||
OmnipodModule::class
|
||||
]
|
||||
)
|
||||
interface AppComponent : AndroidInjector<MainApp> {
|
||||
|
|
|
@ -21,7 +21,6 @@ import info.nightscout.androidaps.interfaces.PluginDescription;
|
|||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.logging.LTag;
|
||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDriverState;
|
||||
|
@ -44,11 +43,10 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
|||
* @author Andy Rozman (andy.rozman@gmail.com)
|
||||
*/
|
||||
// FIXME this is just placeholder for now, but this should use most of OmnipodPumpPlugin implementation
|
||||
// not dagger compatible, but first step is done
|
||||
public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodPumpPluginInterface {
|
||||
|
||||
// TODO Dagger
|
||||
//private static final Logger LOG = LoggerFactory.getLogger(L.PUMP);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMP);
|
||||
|
||||
protected static OmnipodDashPumpPlugin plugin = null;
|
||||
//private RileyLinkOmnipodService omnipodService;
|
||||
|
@ -68,7 +66,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
|||
|
||||
private Profile currentProfile;
|
||||
|
||||
//@Inject
|
||||
@Inject
|
||||
public OmnipodDashPumpPlugin(HasAndroidInjector injector,
|
||||
AAPSLogger aapsLogger,
|
||||
RxBusWrapper rxBus,
|
||||
|
@ -106,13 +104,13 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
|||
//
|
||||
// public void onServiceDisconnected(ComponentName name) {
|
||||
// if (isLoggingEnabled())
|
||||
// aapsLogger.debug(LTag.PUMP, "RileyLinkOmnipodService is disconnected");
|
||||
// LOG.debug("RileyLinkOmnipodService is disconnected");
|
||||
// omnipodService = null;
|
||||
// }
|
||||
//
|
||||
// public void onServiceConnected(ComponentName name, IBinder service) {
|
||||
// if (isLoggingEnabled())
|
||||
// aapsLogger.debug(LTag.PUMP, "RileyLinkOmnipodService is connected");
|
||||
// LOG.debug("RileyLinkOmnipodService is connected");
|
||||
// RileyLinkOmnipodService.LocalBinder mLocalBinder = (RileyLinkOmnipodService.LocalBinder) service;
|
||||
// omnipodService = mLocalBinder.getServiceInstance();
|
||||
//
|
||||
|
@ -123,7 +121,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
|||
//
|
||||
// if (OmnipodUtil.getPumpStatus() != null) {
|
||||
// if (isLoggingEnabled())
|
||||
// aapsLogger.debug(LTag.PUMP, "Starting OmniPod-RileyLink service");
|
||||
// LOG.debug("Starting OmniPod-RileyLink service");
|
||||
// if (OmnipodUtil.getPumpStatus().setNotInPreInit()) {
|
||||
// break;
|
||||
// }
|
||||
|
@ -173,7 +171,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
|||
@Override
|
||||
public boolean isInitialized() {
|
||||
if (displayConnectionMessages)
|
||||
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isInitialized");
|
||||
LOG.debug(getLogPrefix() + "isInitialized");
|
||||
return isServiceSet() && isInitialized;
|
||||
}
|
||||
|
||||
|
@ -181,7 +179,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
|||
@Override
|
||||
public boolean isConnected() {
|
||||
if (displayConnectionMessages)
|
||||
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isConnected");
|
||||
LOG.debug(getLogPrefix() + "isConnected");
|
||||
return isServiceSet() && isServiceInitialized();
|
||||
}
|
||||
|
||||
|
@ -189,7 +187,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
|||
@Override
|
||||
public boolean isConnecting() {
|
||||
if (displayConnectionMessages)
|
||||
aapsLogger.debug(LTag.PUMP, getLogPrefix() + "isConnecting");
|
||||
LOG.debug(getLogPrefix() + "isConnecting");
|
||||
return !isServiceSet() || !isServiceInitialized();
|
||||
}
|
||||
|
||||
|
@ -226,7 +224,7 @@ public class OmnipodDashPumpPlugin extends OmnipodPumpPlugin implements OmnipodP
|
|||
|
||||
private void initializePump(boolean realInit) {
|
||||
|
||||
aapsLogger.info(LTag.PUMP,getLogPrefix() + "initializePump - start");
|
||||
LOG.info(getLogPrefix() + "initializePump - start");
|
||||
|
||||
if (omnipodCommunicationManager == null) {
|
||||
omnipodCommunicationManager = OmnipodDashCommunicationManager.getInstance();
|
||||
|
|
|
@ -8,7 +8,6 @@ import org.slf4j.LoggerFactory;
|
|||
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy;
|
||||
|
@ -27,9 +26,7 @@ public class OmnipodDashCommunicationManager implements OmnipodCommunicationMana
|
|||
|
||||
// TODO Dagger
|
||||
|
||||
//private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
||||
|
||||
private AAPSLogger aapsLogger;
|
||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
||||
|
||||
private static OmnipodDashCommunicationManager omnipodCommunicationManager;
|
||||
private String errorMessage;
|
||||
|
@ -63,6 +60,10 @@ public class OmnipodDashCommunicationManager implements OmnipodCommunicationMana
|
|||
}
|
||||
|
||||
|
||||
private boolean isLogEnabled() {
|
||||
return L.isEnabled(L.PUMPCOMM);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult initPod(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver, Profile profile) {
|
||||
|
|
Loading…
Reference in a new issue