diff --git a/app/build.gradle b/app/build.gradle
index 732b465487..f1f1afa44f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -177,10 +177,12 @@ dependencies {
wearApp project(':wear')
implementation project(':core')
+ implementation project(':combo')
implementation project(':database')
implementation project(':dana')
implementation project(':danars')
implementation project(':danar')
+ implementation project(':insight')
implementation project(':rileylink')
implementation project(':medtronic')
implementation project(':omnipod-common')
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1abc55ecfe..a367417120 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -219,8 +219,6 @@
android:exported="false" />
-
-
-
-
-
@@ -259,13 +243,6 @@
-
-
-
-
diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt
index 09505d0e18..072e621cdc 100644
--- a/app/src/main/java/info/nightscout/androidaps/MainActivity.kt
+++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.kt
@@ -138,7 +138,7 @@ class MainActivity : NoSplashAppCompatActivity() {
.observeOn(aapsSchedulers.main)
.subscribe({ processPreferenceChange(it) }, fabricPrivacy::logException)
)
- if (!sp.getBoolean(R.string.key_setupwizard_processed, false) && !isRunningRealPumpTest()) {
+ if (startWizard() && !isRunningRealPumpTest()) {
protectionCheck.queryProtection(this, ProtectionCheck.Protection.PREFERENCES, {
startActivity(Intent(this, SetupWizardActivity::class.java))
})
@@ -156,6 +156,9 @@ class MainActivity : NoSplashAppCompatActivity() {
if (viewPager.currentItem >= 0) pluginPreferencesMenuItem?.isEnabled = (viewPager.adapter as TabPageAdapter).getPluginAt(viewPager.currentItem).preferencesId != -1
}
+ private fun startWizard() : Boolean =
+ !sp.getBoolean(R.string.key_setupwizard_processed, false)
+
override fun onPostCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
super.onPostCreate(savedInstanceState, persistentState)
actionBarDrawerToggle.syncState()
@@ -381,6 +384,7 @@ class MainActivity : NoSplashAppCompatActivity() {
FirebaseCrashlytics.getInstance().setCustomKey("Remote", remote)
FirebaseCrashlytics.getInstance().setCustomKey("Committed", BuildConfig.COMMITTED)
FirebaseCrashlytics.getInstance().setCustomKey("Hash", hashes[0])
+ FirebaseCrashlytics.getInstance().setCustomKey("Email", sp.getString(R.string.key_email_for_crash_report, ""))
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java
index ae7a6e4436..9eb8a59a5e 100644
--- a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java
+++ b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java
@@ -46,6 +46,7 @@ import info.nightscout.androidaps.events.EventReloadTreatmentData;
import info.nightscout.androidaps.events.EventTempBasalChange;
import info.nightscout.androidaps.events.EventTempTargetChange;
import info.nightscout.androidaps.interfaces.ActivePluginProvider;
+import info.nightscout.androidaps.interfaces.DatabaseHelperInterface;
import info.nightscout.androidaps.interfaces.ProfileInterface;
import info.nightscout.androidaps.interfaces.ProfileStore;
import info.nightscout.androidaps.logging.AAPSLogger;
@@ -54,9 +55,6 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.openhumans.OpenHumansUploader;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventNewHistoryData;
-import info.nightscout.androidaps.plugins.pump.insight.database.InsightBolusID;
-import info.nightscout.androidaps.plugins.pump.insight.database.InsightHistoryOffset;
-import info.nightscout.androidaps.plugins.pump.insight.database.InsightPumpID;
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
import info.nightscout.androidaps.utils.JsonHelper;
import info.nightscout.androidaps.utils.PercentageSplitter;
@@ -83,9 +81,6 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
public static final String DATABASE_DBREQUESTS = "DBRequests";
public static final String DATABASE_CAREPORTALEVENTS = "CareportalEvents";
public static final String DATABASE_TDDS = "TDDs";
- public static final String DATABASE_INSIGHT_HISTORY_OFFSETS = "InsightHistoryOffsets";
- public static final String DATABASE_INSIGHT_BOLUS_IDS = "InsightBolusIDs";
- public static final String DATABASE_INSIGHT_PUMP_IDS = "InsightPumpIDs";
public static final String DATABASE_OPEN_HUMANS_QUEUE = "OpenHumansQueue";
private static final int DATABASE_VERSION = 13;
@@ -138,10 +133,10 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
TableUtils.createTableIfNotExists(connectionSource, InsightPumpID.class);
TableUtils.createTableIfNotExists(connectionSource, OmnipodHistoryRecord.class);
TableUtils.createTableIfNotExists(connectionSource, OHQueueItem.class);
- database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DATABASE_INSIGHT_BOLUS_IDS + "\", " + System.currentTimeMillis() + " " +
- "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DATABASE_INSIGHT_BOLUS_IDS + "\")");
- database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DATABASE_INSIGHT_PUMP_IDS + "\", " + System.currentTimeMillis() + " " +
- "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DATABASE_INSIGHT_PUMP_IDS + "\")");
+ database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_BOLUS_IDS + "\", " + System.currentTimeMillis() + " " +
+ "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_BOLUS_IDS + "\")");
+ database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_PUMP_IDS + "\", " + System.currentTimeMillis() + " " +
+ "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_PUMP_IDS + "\")");
} catch (SQLException e) {
aapsLogger.error("Can't create database", e);
throw new RuntimeException(e);
@@ -169,13 +164,13 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
TableUtils.createTableIfNotExists(connectionSource, InsightHistoryOffset.class);
TableUtils.createTableIfNotExists(connectionSource, InsightBolusID.class);
TableUtils.createTableIfNotExists(connectionSource, InsightPumpID.class);
- database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DATABASE_INSIGHT_BOLUS_IDS + "\", " + System.currentTimeMillis() + " " +
- "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DATABASE_INSIGHT_BOLUS_IDS + "\")");
- database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DATABASE_INSIGHT_PUMP_IDS + "\", " + System.currentTimeMillis() + " " +
- "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DATABASE_INSIGHT_PUMP_IDS + "\")");
+ database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_BOLUS_IDS + "\", " + System.currentTimeMillis() + " " +
+ "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_BOLUS_IDS + "\")");
+ database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_PUMP_IDS + "\", " + System.currentTimeMillis() + " " +
+ "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_PUMP_IDS + "\")");
} else if (oldVersion < 11) {
- database.execSQL("UPDATE sqlite_sequence SET seq = " + System.currentTimeMillis() + " WHERE name = \"" + DATABASE_INSIGHT_BOLUS_IDS + "\"");
- database.execSQL("UPDATE sqlite_sequence SET seq = " + System.currentTimeMillis() + " WHERE name = \"" + DATABASE_INSIGHT_PUMP_IDS + "\"");
+ database.execSQL("UPDATE sqlite_sequence SET seq = " + System.currentTimeMillis() + " WHERE name = \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_BOLUS_IDS + "\"");
+ database.execSQL("UPDATE sqlite_sequence SET seq = " + System.currentTimeMillis() + " WHERE name = \"" + DatabaseHelperInterface.Companion.DATABASE_INSIGHT_PUMP_IDS + "\"");
}
TableUtils.createTableIfNotExists(connectionSource, OHQueueItem.class);
} catch (SQLException e) {
diff --git a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelperProvider.java b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelperProvider.java
index 41f7cabdd9..71d61d7276 100644
--- a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelperProvider.java
+++ b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelperProvider.java
@@ -108,4 +108,35 @@ public class DatabaseHelperProvider implements DatabaseHelperInterface {
return MainApp.getDbHelper().getProfileSwitchData(from, ascending);
}
+ @Override public void createOrUpdate(@NotNull InsightBolusID record) {
+ MainApp.getDbHelper().createOrUpdate(record);
+ }
+
+ @Override public void createOrUpdate(@NotNull InsightPumpID record) {
+ MainApp.getDbHelper().createOrUpdate(record);
+ }
+
+ @Override public void createOrUpdate(@NotNull InsightHistoryOffset record) {
+ MainApp.getDbHelper().createOrUpdate(record);
+ }
+
+ @Override public void delete(@NotNull ExtendedBolus extendedBolus) {
+ MainApp.getDbHelper().delete(extendedBolus);
+ }
+
+ @Nullable @Override public ExtendedBolus getExtendedBolusByPumpId(long pumpId) {
+ return MainApp.getDbHelper().getExtendedBolusByPumpId(pumpId);
+ }
+
+ @Nullable @Override public InsightBolusID getInsightBolusID(@NotNull String pumpSerial, int bolusID, long timestamp) {
+ return MainApp.getDbHelper().getInsightBolusID(pumpSerial, bolusID, timestamp);
+ }
+
+ @Nullable @Override public InsightHistoryOffset getInsightHistoryOffset(@NotNull String pumpSerial) {
+ return MainApp.getDbHelper().getInsightHistoryOffset(pumpSerial);
+ }
+
+ @Nullable @Override public InsightPumpID getPumpStoppedEvent(@NotNull String pumpSerial, long before) {
+ return MainApp.getDbHelper().getPumpStoppedEvent(pumpSerial, before);
+ }
}
diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ActivitiesModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ActivitiesModule.kt
index 54f139f0e8..95e0888b79 100644
--- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ActivitiesModule.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ActivitiesModule.kt
@@ -9,12 +9,6 @@ import info.nightscout.androidaps.plugins.general.maintenance.activities.LogSett
import info.nightscout.androidaps.plugins.general.openhumans.OpenHumansLoginActivity
import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity
import info.nightscout.androidaps.plugins.general.smsCommunicator.activities.SmsCommunicatorOtpActivity
-import info.nightscout.androidaps.plugins.pump.common.dialog.RileyLinkBLEConfigActivity
-import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity
-import info.nightscout.androidaps.plugins.pump.insight.activities.InsightAlertActivity
-import info.nightscout.androidaps.plugins.pump.insight.activities.InsightPairingActivity
-import info.nightscout.androidaps.plugins.pump.insight.activities.InsightPairingInformationActivity
-import info.nightscout.androidaps.plugins.pump.medtronic.dialog.MedtronicHistoryActivity
import info.nightscout.androidaps.setupwizard.SetupWizardActivity
@Module
@@ -22,17 +16,11 @@ import info.nightscout.androidaps.setupwizard.SetupWizardActivity
abstract class ActivitiesModule {
@ContributesAndroidInjector abstract fun contributesHistoryBrowseActivity(): HistoryBrowseActivity
- @ContributesAndroidInjector abstract fun contributesInsightAlertActivity(): InsightAlertActivity
- @ContributesAndroidInjector abstract fun contributesInsightPairingActivity(): InsightPairingActivity
- @ContributesAndroidInjector abstract fun contributesInsightPairingInformationActivity(): InsightPairingInformationActivity
@ContributesAndroidInjector abstract fun contributesLogSettingActivity(): LogSettingActivity
@ContributesAndroidInjector abstract fun contributeMainActivity(): MainActivity
- @ContributesAndroidInjector abstract fun contributesMedtronicHistoryActivity(): MedtronicHistoryActivity
@ContributesAndroidInjector abstract fun contributesPreferencesActivity(): PreferencesActivity
@ContributesAndroidInjector abstract fun contributesQuickWizardListActivity(): QuickWizardListActivity
@ContributesAndroidInjector abstract fun contributesRequestDexcomPermissionActivity(): RequestDexcomPermissionActivity
- @ContributesAndroidInjector abstract fun contributesRileyLinkStatusActivity(): RileyLinkStatusActivity
- @ContributesAndroidInjector abstract fun contributesRileyLinkBLEConfigActivity(): RileyLinkBLEConfigActivity
@ContributesAndroidInjector abstract fun contributesSetupWizardActivity(): SetupWizardActivity
@ContributesAndroidInjector abstract fun contributesSingleFragmentActivity(): SingleFragmentActivity
@ContributesAndroidInjector abstract fun contributesSmsCommunicatorOtpActivity(): SmsCommunicatorOtpActivity
diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/AppComponent.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/AppComponent.kt
index 61cb5334b0..f1075e2e9c 100644
--- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/AppComponent.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/AppComponent.kt
@@ -5,12 +5,15 @@ import dagger.Component
import dagger.android.AndroidInjectionModule
import dagger.android.AndroidInjector
import info.nightscout.androidaps.MainApp
+import info.nightscout.androidaps.combo.di.ComboModule
import info.nightscout.androidaps.core.di.CoreModule
import info.nightscout.androidaps.dana.di.DanaModule
import info.nightscout.androidaps.danar.di.DanaRModule
import info.nightscout.androidaps.danars.di.DanaRSModule
+import info.nightscout.androidaps.danars.di.InsightModule
import info.nightscout.androidaps.database.DatabaseModule
-import info.nightscout.androidaps.plugins.pump.common.dagger.RileyLinkModule
+import info.nightscout.androidaps.plugins.pump.common.di.RileyLinkModule
+import info.nightscout.androidaps.plugins.pump.medtronic.di.MedtronicModule
import info.nightscout.androidaps.plugins.pump.omnipod.eros.dagger.OmnipodErosModule
import javax.inject.Singleton
@@ -43,6 +46,8 @@ import javax.inject.Singleton
DanaModule::class,
DanaRModule::class,
DanaRSModule::class,
+ ComboModule::class,
+ InsightModule::class,
WorkersModule::class,
OHUploaderModule::class
]
diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/FragmentsModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/FragmentsModule.kt
index d7f9e11759..4acdd1f0db 100644
--- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/FragmentsModule.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/FragmentsModule.kt
@@ -30,13 +30,6 @@ import info.nightscout.androidaps.plugins.general.wear.WearFragment
import info.nightscout.androidaps.plugins.insulin.InsulinFragment
import info.nightscout.androidaps.plugins.profile.local.LocalProfileFragment
import info.nightscout.androidaps.plugins.profile.ns.NSProfileFragment
-import info.nightscout.androidaps.plugins.pump.combo.ComboFragment
-import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusGeneralFragment
-import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusHistoryFragment
-import info.nightscout.androidaps.plugins.pump.insight.LocalInsightFragment
-import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicFragment
-import info.nightscout.androidaps.plugins.pump.medtronic.dialog.RileyLinkStatusDeviceMedtronic
-import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.OmnipodErosOverviewFragment
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpFragment
import info.nightscout.androidaps.plugins.source.BGSourceFragment
import info.nightscout.androidaps.plugins.treatments.TreatmentsFragment
@@ -52,7 +45,6 @@ abstract class FragmentsModule {
@ContributesAndroidInjector abstract fun contributesActionsFragment(): ActionsFragment
@ContributesAndroidInjector abstract fun contributesAutomationFragment(): AutomationFragment
@ContributesAndroidInjector abstract fun contributesBGSourceFragment(): BGSourceFragment
- @ContributesAndroidInjector abstract fun contributesComboFragment(): ComboFragment
@ContributesAndroidInjector
abstract fun contributesConfigBuilderFragment(): ConfigBuilderFragment
@@ -64,11 +56,8 @@ abstract class FragmentsModule {
@ContributesAndroidInjector abstract fun contributesOpenAPSAMAFragment(): OpenAPSAMAFragment
@ContributesAndroidInjector abstract fun contributesOpenAPSSMBFragment(): OpenAPSSMBFragment
@ContributesAndroidInjector abstract fun contributesOverviewFragment(): OverviewFragment
- @ContributesAndroidInjector abstract fun contributesLocalInsightFragment(): LocalInsightFragment
@ContributesAndroidInjector abstract fun contributesLoopFragment(): LoopFragment
@ContributesAndroidInjector abstract fun contributesMaintenanceFragment(): MaintenanceFragment
- @ContributesAndroidInjector abstract fun contributesMedtronicFragment(): MedtronicFragment
- @ContributesAndroidInjector abstract fun contributesOmnipodFragment(): OmnipodErosOverviewFragment
@ContributesAndroidInjector abstract fun contributesNSProfileFragment(): NSProfileFragment
@ContributesAndroidInjector abstract fun contributesNSClientFragment(): NSClientFragment
@ContributesAndroidInjector
@@ -117,11 +106,4 @@ abstract class FragmentsModule {
abstract fun contributesExchangeAuthTokenDialot(): OpenHumansLoginActivity.ExchangeAuthTokenDialog
@ContributesAndroidInjector abstract fun contributesPasswordCheck(): PasswordCheck
-
- @ContributesAndroidInjector
- abstract fun contributesRileyLinkStatusGeneral(): RileyLinkStatusGeneralFragment
- @ContributesAndroidInjector
- abstract fun contributesRileyLinkStatusHistoryFragment(): RileyLinkStatusHistoryFragment
- @ContributesAndroidInjector
- abstract fun contributesRileyLinkStatusDeviceMedtronic(): RileyLinkStatusDeviceMedtronic
}
\ No newline at end of file
diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/MedtronicModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/MedtronicModule.kt
deleted file mode 100644
index cadac7d13c..0000000000
--- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/MedtronicModule.kt
+++ /dev/null
@@ -1,13 +0,0 @@
-package info.nightscout.androidaps.dependencyInjection
-
-import dagger.Module
-import dagger.android.ContributesAndroidInjector
-import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager
-import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUITask
-
-@Module
-@Suppress("unused")
-abstract class MedtronicModule {
- @ContributesAndroidInjector abstract fun medtronicCommunicationManagerProvider(): MedtronicCommunicationManager
- @ContributesAndroidInjector abstract fun medtronicUITaskProvider(): MedtronicUITask
-}
\ No newline at end of file
diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ServicesModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ServicesModule.kt
index 50f8695bf9..04165b32a1 100644
--- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ServicesModule.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/ServicesModule.kt
@@ -6,11 +6,6 @@ import info.nightscout.androidaps.plugins.general.nsclient.services.NSClientServ
import info.nightscout.androidaps.plugins.general.overview.notifications.DismissNotificationService
import info.nightscout.androidaps.plugins.general.persistentNotification.DummyService
import info.nightscout.androidaps.plugins.general.wear.wearintegration.WatchUpdaterService
-import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkService
-import info.nightscout.androidaps.plugins.pump.insight.InsightAlertService
-import info.nightscout.androidaps.plugins.pump.insight.connection_service.InsightConnectionService
-import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtronicService
-import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.service.RileyLinkOmnipodService
import info.nightscout.androidaps.services.AlarmSoundService
import info.nightscout.androidaps.services.LocationService
@@ -24,9 +19,4 @@ abstract class ServicesModule {
@ContributesAndroidInjector abstract fun contributesLocationService(): LocationService
@ContributesAndroidInjector abstract fun contributesNSClientService(): NSClientService
@ContributesAndroidInjector abstract fun contributesWatchUpdaterService(): WatchUpdaterService
- @ContributesAndroidInjector abstract fun contributesInsightAlertService(): InsightAlertService
- @ContributesAndroidInjector abstract fun contributesInsightConnectionService(): InsightConnectionService
- @ContributesAndroidInjector abstract fun contributesRileyLinkService(): RileyLinkService
- @ContributesAndroidInjector abstract fun contributesRileyLinkMedtronicService(): RileyLinkMedtronicService
- @ContributesAndroidInjector abstract fun contributesRileyLinkOmnipodService(): RileyLinkOmnipodService
}
\ No newline at end of file
diff --git a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/WizardModule.kt b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/WizardModule.kt
index 2c105e9ce7..1405b8867f 100644
--- a/app/src/main/java/info/nightscout/androidaps/dependencyInjection/WizardModule.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dependencyInjection/WizardModule.kt
@@ -18,6 +18,7 @@ abstract class WizardModule {
@ContributesAndroidInjector abstract fun swEditEncryptedPasswordInjector(): SWEditEncryptedPassword
@ContributesAndroidInjector abstract fun swEditUrlInjector(): SWEditUrl
@ContributesAndroidInjector abstract fun swFragmentInjector(): SWFragment
+ @ContributesAndroidInjector abstract fun swPreferenceInjector(): SWPreference
@ContributesAndroidInjector abstract fun swHtmlLinkInjector(): SWHtmlLink
@ContributesAndroidInjector abstract fun swInfotextInjector(): SWInfoText
@ContributesAndroidInjector abstract fun swItemInjector(): SWItem
diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt
index 36246c4c2c..de7e3f4d4f 100644
--- a/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt
@@ -91,7 +91,7 @@ class ExtendedBolusDialog : DialogFragmentWithDate() {
commandQueue.extendedBolus(insulinAfterConstraint, durationInMinutes, object : Callback() {
override fun run() {
if (!result.success) {
- ErrorHelperActivity.runAlarm(ctx, result.comment, resourceHelper.gs(R.string.treatmentdeliveryerror), info.nightscout.androidaps.dana.R.raw.boluserror)
+ ErrorHelperActivity.runAlarm(ctx, result.comment, resourceHelper.gs(R.string.treatmentdeliveryerror), R.raw.boluserror)
}
}
})
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationStore.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationStore.kt
index a736e78367..e818dd8fc1 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationStore.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/NotificationStore.kt
@@ -1,6 +1,5 @@
package info.nightscout.androidaps.plugins.general.overview.notifications
-import android.annotation.SuppressLint
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
@@ -11,14 +10,10 @@ import android.media.RingtoneManager
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import android.widget.Button
-import android.widget.TextView
-import androidx.cardview.widget.CardView
import androidx.core.app.NotificationCompat
-import androidx.core.app.TaskStackBuilder
import androidx.recyclerview.widget.RecyclerView
-import info.nightscout.androidaps.MainActivity
import info.nightscout.androidaps.R
+import info.nightscout.androidaps.databinding.OverviewNotificationItemBinding
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
@@ -45,8 +40,7 @@ class NotificationStore @Inject constructor(
private val dateUtil: DateUtil
) {
- var store: MutableList = ArrayList()
- private var usesChannels = false
+ private var store: MutableList = ArrayList()
companion object {
@@ -71,20 +65,19 @@ class NotificationStore @Inject constructor(
}
}
store.add(n)
- if (sp.getBoolean(R.string.key_raise_notifications_as_android_notifications, true) && n !is NotificationWithAction) {
+ if (sp.getBoolean(R.string.key_raise_notifications_as_android_notifications, true) && n !is NotificationWithAction)
raiseSystemNotification(n)
- if (usesChannels && n.soundId != null && n.soundId != 0) alarmSoundServiceHelper.startAlarm(context, n.soundId)
- } else {
- if (n.soundId != null && n.soundId != 0) alarmSoundServiceHelper.startAlarm(context, n.soundId)
- }
+ if (n.soundId != null && n.soundId != 0) alarmSoundServiceHelper.startAlarm(context, n.soundId)
Collections.sort(store, NotificationComparator())
return true
}
- @Synchronized fun remove(id: Int): Boolean {
+ @Synchronized
+ fun remove(id: Int): Boolean {
for (i in store.indices) {
if (store[i].id == id) {
if (store[i].soundId != null) alarmSoundServiceHelper.stopService(context)
+ aapsLogger.debug(LTag.NOTIFICATION, "Notification removed: " + store[i].text)
store.removeAt(i)
return true
}
@@ -92,11 +85,14 @@ class NotificationStore @Inject constructor(
return false
}
- @Synchronized private fun removeExpired() {
+ @Synchronized
+ private fun removeExpired() {
var i = 0
while (i < store.size) {
val n = store[i]
if (n.validTo != 0L && n.validTo < System.currentTimeMillis()) {
+ if (store[i].soundId != null) alarmSoundServiceHelper.stopService(context)
+ aapsLogger.debug(LTag.NOTIFICATION, "Notification expired: " + store[i].text)
store.removeAt(i)
i--
}
@@ -135,20 +131,17 @@ class NotificationStore @Inject constructor(
}
fun createNotificationChannel() {
- usesChannels = true
val mNotificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
- @SuppressLint("WrongConstant") val channel = NotificationChannel(CHANNEL_ID,
- CHANNEL_ID,
- NotificationManager.IMPORTANCE_HIGH)
+ val channel = NotificationChannel(CHANNEL_ID, CHANNEL_ID, NotificationManager.IMPORTANCE_HIGH)
mNotificationManager.createNotificationChannel(channel)
}
@Synchronized
fun updateNotifications(notificationsView: RecyclerView) {
removeExpired()
-// unSnooze()
- if (store.size > 0) {
- val adapter = NotificationRecyclerViewAdapter(cloneStore())
+ val clonedStore = ArrayList(store)
+ if (clonedStore.isNotEmpty()) {
+ val adapter = NotificationRecyclerViewAdapter(clonedStore)
notificationsView.adapter = adapter
notificationsView.visibility = View.VISIBLE
} else {
@@ -156,33 +149,24 @@ class NotificationStore @Inject constructor(
}
}
- @Synchronized
- private fun cloneStore(): List {
- val clone: MutableList = ArrayList(store.size)
- clone.addAll(store)
- return clone
- }
-
inner class NotificationRecyclerViewAdapter internal constructor(private val notificationsList: List) : RecyclerView.Adapter() {
- override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): NotificationsViewHolder {
- val v = LayoutInflater.from(viewGroup.context).inflate(R.layout.overview_notification_item, viewGroup, false)
- return NotificationsViewHolder(v)
- }
+ override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): NotificationsViewHolder =
+ NotificationsViewHolder(LayoutInflater.from(viewGroup.context).inflate(R.layout.overview_notification_item, viewGroup, false))
override fun onBindViewHolder(holder: NotificationsViewHolder, position: Int) {
val notification = notificationsList[position]
- holder.dismiss.tag = notification
- if (notification.buttonText != 0) holder.dismiss.setText(notification.buttonText)
- else holder.dismiss.setText(R.string.snooze)
+ holder.binding.dismiss.tag = notification
+ if (notification.buttonText != 0) holder.binding.dismiss.setText(notification.buttonText)
+ else holder.binding.dismiss.setText(R.string.snooze)
@Suppress("SetTextI18n")
- holder.text.text = dateUtil.timeString(notification.date) + " " + notification.text
+ holder.binding.text.text = dateUtil.timeString(notification.date) + " " + notification.text
when (notification.level) {
- Notification.URGENT -> holder.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationUrgent))
- Notification.NORMAL -> holder.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationNormal))
- Notification.LOW -> holder.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationLow))
- Notification.INFO -> holder.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationInfo))
- Notification.ANNOUNCEMENT -> holder.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationAnnouncement))
+ Notification.URGENT -> holder.binding.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationUrgent))
+ Notification.NORMAL -> holder.binding.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationNormal))
+ Notification.LOW -> holder.binding.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationLow))
+ Notification.INFO -> holder.binding.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationInfo))
+ Notification.ANNOUNCEMENT -> holder.binding.cv.setBackgroundColor(resourceHelper.gc(R.color.notificationAnnouncement))
}
}
@@ -192,12 +176,10 @@ class NotificationStore @Inject constructor(
inner class NotificationsViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
- var cv: CardView = itemView.findViewById(R.id.notification_cardview)
- var text: TextView = itemView.findViewById(R.id.notification_text)
- var dismiss: Button = itemView.findViewById(R.id.notification_dismiss)
+ val binding = OverviewNotificationItemBinding.bind(itemView)
init {
- dismiss.setOnClickListener {
+ binding.dismiss.setOnClickListener {
val notification = it.tag as Notification
rxBus.send(EventDismissNotification(notification.id))
notification.action?.run()
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyServiceHelper.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyServiceHelper.kt
index d1adfc00ed..5f52035bac 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyServiceHelper.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyServiceHelper.kt
@@ -4,9 +4,7 @@ import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.ServiceConnection
-import android.os.Build
import android.os.IBinder
-import androidx.annotation.RequiresApi
import info.nightscout.androidaps.interfaces.NotificationHolderInterface
import javax.inject.Inject
import javax.inject.Singleton
@@ -14,14 +12,13 @@ import javax.inject.Singleton
/*
This code replaces following
val alarm = Intent(context, DummyService::class.java)
- alarm.putExtra("soundid", n.soundId)
+ alarm.putExtra("soundId", n.soundId)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) context.startForegroundService(alarm) else context.startService(alarm)
it fails randomly with error
Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e317f7e u0 info.nightscout.nsclient/info.nightscout.androidaps.services.DummyService}
*/
-@RequiresApi(Build.VERSION_CODES.O)
@Singleton
class DummyServiceHelper @Inject constructor(
private val notificationHolder: NotificationHolderInterface
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt
index 0d6defc736..d65114f9ff 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.kt
@@ -30,7 +30,7 @@ import io.reactivex.disposables.CompositeDisposable
import javax.inject.Inject
import javax.inject.Singleton
-@Suppress("PrivatePropertyName")
+@Suppress("PrivatePropertyName", "DEPRECATION")
@Singleton
class PersistentNotificationPlugin @Inject constructor(
injector: HasAndroidInjector,
diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt
index 9a077ce965..5e1dbb7cb5 100644
--- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt
+++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt
@@ -189,6 +189,13 @@ class SWDefinition @Inject constructor(
.add(SWEditString(injector)
.validator(SWTextValidator(String::isNotEmpty))
.preferenceId(R.string.key_patient_name))
+ private val privacy = SWScreen(injector, R.string.privacy_settings)
+ .skippable(true)
+ .add(SWInfoText(injector)
+ .label(R.string.privacy_summary))
+ .add(SWPreference(injector, this)
+ .option(R.xml.pref_datachoices)
+ )
private val screenMasterPassword = SWScreen(injector, R.string.master_password)
.skippable(false)
.add(SWInfoText(injector)
@@ -374,6 +381,7 @@ class SWDefinition @Inject constructor(
.add(screenPermissionStore)
.add(screenMasterPassword)
.add(screenImport)
+ .add(privacy)
.add(screenUnits)
.add(displaySettings)
.add(screenNsClient)
diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWItem.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWItem.kt
index c6cc3f9620..2a25c2ea91 100644
--- a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWItem.kt
+++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWItem.kt
@@ -31,8 +31,9 @@ open class SWItem(val injector: HasAndroidInjector, var type: Type) {
injector.androidInjector().inject(this)
}
+ @Suppress("unused")
enum class Type {
- NONE, TEXT, HTML_LINK, BREAK, LISTENER, URL, STRING, NUMBER, DECIMAL_NUMBER, RADIOBUTTON, PLUGIN, BUTTON, FRAGMENT, UNIT_NUMBER
+ NONE, TEXT, HTML_LINK, BREAK, LISTENER, URL, STRING, NUMBER, DECIMAL_NUMBER, RADIOBUTTON, PLUGIN, BUTTON, FRAGMENT, UNIT_NUMBER, PREFERENCE
}
var label: Int? = null
diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPlugin.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPlugin.kt
index 76c140d708..95401bdfab 100644
--- a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPlugin.kt
+++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPlugin.kt
@@ -18,7 +18,7 @@ import info.nightscout.androidaps.setupwizard.SWDefinition
import info.nightscout.androidaps.setupwizard.events.EventSWUpdate
import javax.inject.Inject
-class SWPlugin(injector: HasAndroidInjector, val definition: SWDefinition) : SWItem(injector, Type.PLUGIN) {
+class SWPlugin(injector: HasAndroidInjector, private val definition: SWDefinition) : SWItem(injector, Type.PLUGIN) {
@Inject lateinit var pluginStore: PluginStore
@Inject lateinit var configBuilderPlugin: ConfigBuilderPlugin
diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPreference.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPreference.kt
new file mode 100644
index 0000000000..7abafa7c82
--- /dev/null
+++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/elements/SWPreference.kt
@@ -0,0 +1,38 @@
+package info.nightscout.androidaps.setupwizard.elements
+
+import android.os.Bundle
+import android.widget.LinearLayout
+import dagger.android.HasAndroidInjector
+import info.nightscout.androidaps.activities.MyPreferenceFragment
+import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
+import info.nightscout.androidaps.plugins.configBuilder.PluginStore
+import info.nightscout.androidaps.setupwizard.SWDefinition
+import javax.inject.Inject
+
+class SWPreference(injector: HasAndroidInjector, private val definition: SWDefinition) : SWItem(injector, Type.PREFERENCE) {
+
+ @Inject lateinit var pluginStore: PluginStore
+ @Inject lateinit var configBuilderPlugin: ConfigBuilderPlugin
+
+ private var xml: Int = -1
+
+ fun option(xml: Int): SWPreference {
+ this.xml = xml
+ return this
+ }
+
+ override fun generateDialog(layout: LinearLayout) {
+ addConfiguration(layout, xml)
+ super.generateDialog(layout)
+ }
+
+ private fun addConfiguration(layout: LinearLayout, xml: Int) {
+ MyPreferenceFragment().also { fragment ->
+ fragment.arguments = Bundle().also { it.putInt("id", xml) }
+ definition.activity.supportFragmentManager.beginTransaction().run {
+ replace(layout.id, fragment)
+ commit()
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/overview_notification_item.xml b/app/src/main/res/layout/overview_notification_item.xml
index 03b5688fc3..f8f1974d33 100644
--- a/app/src/main/res/layout/overview_notification_item.xml
+++ b/app/src/main/res/layout/overview_notification_item.xml
@@ -1,7 +1,8 @@
+ android:text="Notification text. Notification text. Notification text. Notification text. Notification text. Notification text. "
+ tools:ignore="HardcodedText" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9c0acd512a..f4d5bb15d3 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -27,6 +27,8 @@
Swedish
Turkish
+ email_for_crash_report
+
Treatments safety
Max allowed bolus [U]
Max allowed carbs [g]
@@ -56,7 +58,6 @@
Shows an ongoing notification with a short overview of what your loop is doing
Define a profile which is available offline.
Provides the profile you have defined in Nightscout
- Pump integration for Accu-Chek Combo pumps, requires having ruffy installed
Pump integration for people who do multiple daily injections for their diabetes therapy
Pump integration for pumps which don\'t have any driver yet (Open Loop)
Sensitivity is calculated the same way like Oref0, but you can specify timeframe to the past. Minimal carb absorption is calculated from max carb absorption time from preferences.
@@ -90,7 +91,6 @@
Bolus IOB
Run now
VIRTUAL PUMP
- OK
Last run
Input parameters
Glucose status
@@ -161,7 +161,6 @@
New suggestion available
Carbs Suggestion
Unsupported version of Nightscout
- LOOP DISABLED BY CONSTRAINTS
Basal IOB
Bolus constraint applied
Carbs constraint applied
@@ -231,7 +230,6 @@
Minimum number of minutes that must elapse between one remote bolus and the next
How many minutes must elapse, at least, between one bolus and the next
For your safety, to edit this preference you need to add at least 2 phone numbers.
- Bolus %1$.2f U delivered successfully
Going to deliver %1$.2f U
Bolus %1$.2f U delivered successfully
Meal Bolus %1$.2f U delivered successfully
@@ -239,8 +237,6 @@
Target %1$s for %2$d minutes set successfully
Temp Target canceled successfully
Allow remote commands via SMS
- Bolus stopped
- Stopping bolus
Loop has been disabled
Loop has been enabled
Loop is disabled
@@ -388,7 +384,6 @@
Show queue
Queue:
Status:
- Paused
nsclientinternal_url
nsclientinternal_api_secret
Clear log
@@ -554,8 +549,6 @@
Cancel
Not all profiles loaded!
Values not stored!
- Accu-Chek Combo
- COMBO
Enable broadcasts to other apps (like xDrip+). Do not enable if you have more than one instance of AAPS or NSClient installed!
Enable local Broadcasts.
Duration [min]
@@ -600,7 +593,6 @@
Fat
]]>
Command is executed right now
- Pump unreachable
Missed BG readings
raise_urgent_alarms_as_android_notification
Use system notifications for alerts and notifications
@@ -648,42 +640,7 @@
Closed mode enabled
Maximal IOB set properly
BG available from selected source
- Programming pump for bolusing
- State
- Activity
- No connection for %1$d min
- %1$d%% (%2$d min remaining)
- %1$.1f %2$s (%3$s)
- Initializing
- Suspended due to error
- Suspended by user
- Running
- Cancelling TBR
- Setting TBR (%1$d%% / %2$d min)
- Bolusing (%1$.1f U)
- Refreshing
- Requested operation not supported by pump
- Unsafe usage: extended or multiwave boluses are active. Loop mode has been set to low-suspend only 6 hours. Only normal boluses are supported in loop mode
- Unsafe usage: the pump uses a different basal rate profile than the first. The loop has been disabled. Select the first profile on the pump and refresh.
- A bolus with the same amount was requested within the last two minutes. To prevent accidental double boluses and to guard against bugs this is disallowed.
- Now
- Reading pump history
- Setting basal profile
- Pump cartridge level is low
- Pump battery is low
- The pump is showing the error E%1$d: %2$s
- Low
- Empty
- Normal
- Pump clock update needed
- TBR CANCELLED warning was confirmed
- The pump could not be reached. No bolus was given
- Bolus delivery failed. It appears no bolus was delivered. To be sure, please check the pump to avoid a double bolus and then bolus again. To guard against bugs, boluses are not automatically retried.
- Only %1$.2f U of the requested bolus of %2$.2f U was delivered due to an error. Please check the pump to verify this and take appropriate actions.
- Delivering the bolus and verifying the pump\'s history failed, please check the pump. If a bolus was delivered, it will be added to treatments during the next connection to the pump.
- Not enough insulin for bolus left in reservoir
Extended bolus delivery error
- Sight
enableSMB_always
enableSMB_with_COB
enableSMB_with_temptarget
@@ -761,23 +718,8 @@
Running dev version. Closed loop is disabled.
fromNSAreCommingFakedExtendedBoluses
Engineering mode enabled
- Reading basal profile
- The pump history has changed after the bolus calculation was performed. The bolus was not delivered. Please recalculate if a bolus is still needed.
- Bolus successfully delivered, but adding the treatment entry failed. This can happen if two small boluses of the same size are administered within the last two minutes. Please check the pump history and treatment entries and use the Careportal to add missing entries. Make sure not to add any entries for the exact same minute and same amount.
- Rejecting high temp since calculation didn\'t consider recently changed pump history
- Refreshing pump state
- The basal rate on the pump has changed and will be updated soon
- Basal rate changed on pump, but reading it failed
- Checking for history changes
- Multiple boluses with the same amount within the same minute were just imported. Only one record could be added to treatments. Please check the pump and manually add a bolus record using the Careportal tab. Make sure to create a bolus with a time no other bolus uses.
- \n\ndocumentation:\nhttps://androidaps.readthedocs.io\n\nfacebook:\nhttps://www.facebook.com/groups/AndroidAPSUsers
- The last bolus is older than 24 hours or is in the future. Please check the date on the pump is set correctly.
- Time/date of the delivered bolus on pump seems wrong, IOB is likely incorrect. Please check pump time/date.
ProfileSwitch missing. Please do a profile switch or press \"Activate Profile\" in the LocalProfile.
- Bolus count
- TBR count
Pump is not temp basal capable
- No valid basal rate read from pump
Closed loop mode disabled in preferences
Autosens disabled in preferences
SMB disabled in preferences
@@ -793,13 +735,11 @@
Basal set correctly
treatmentssafety_maxbolus
Limiting extended bolus to %1$.1f U because of %2$s
- Limiting max IOB to %1$.1f U because of %2$s
Limiting carbs to %1$d g because of %2$s
Limiting IOB to %1$.1f U because of %2$s
max value in preferences
hard limit
treatmentssafety_maxcarbs
- unsafe usage
openapsama_useautosens
Read status failed
Record pump site change
@@ -812,9 +752,6 @@
openapsmb_max_iob
Maximum total IOB OpenAPS can\'t go over [U]
This value is called Max IOB in OpenAPS context\nOpenAPS will not add more insulin if current IOB is greater than this value
- Pump stopped
- Pump started
- Pump paused
Meal max absorption time [h]
Time at which any meal is considered absorbed. Remaining carbs will be cut off.
Time
@@ -886,7 +823,6 @@
Application needs location permission for BT scan and WiFi identification
Application needs storage permission to be able store log files and export settings
Request
- Exit
Open navigation
Close navigation
Plugin preferences
@@ -908,7 +844,6 @@
sensitivity_raises_target
Sensitivity raises target
When sensitivity is detected, raise the target glucose
- Invalid pump setup, check the docs and verify that the Quick Info menu is named QUICK INFO using the 360 configuration software.
keep_screen_on
Clean AndroidAPS started
Stored settings found
@@ -943,76 +878,6 @@
Minimal request change [%]
Open Loop will popup new change request only if change is bigger than this value in %. Default value is 20%
short_tabtitles
- Searching for devices…
- Pairing completed
- Do the codes displayed on this device and on your pump match?
- Insight pairing
- Accu-Chek Insight
- %1$.2f U / %2$.2f U delivered
- %1$s: %2$s
- Tube changed
- Pump time updated
- Confirm
- Mute
- Pump alert
- Log site changes
- Log reservoir changes
- Log tube changes
- Log battery changes
- Log operating mode changes
- Log alerts
- Enable TBR emulation
- Use extended boluses instead of TBRs to bypass the 250%% limit
- insight_disable_vibration
- Disable vibrations on manual bolus delivery
- For bolus and extended bolus (only available with Insight firmware 3.x)
- insight_disable_vibration_auto
- Disable vibrations on automated bolus delivery
- For SMB and Temp Basal with TBR emulation (only available with Insight firmware 3.x)
- Disconnect delay [s]
- Serial number
- Release software version
- UI processor software version
- PC processor software version
- MD tel processor software version
- Safety processor software version
- BT info page version
- Bluetooth address
- System ID appendix
- Manufacturing date
- Delete pairing
- Pairing information
- Start pump
- Stop pump
- Operating mode
- Status
- TDD Bolus
- TDD Basal
- TDD Total
- Recovering
- Not paired
- Last connected
- Started
- Stopped
- %1$d%% for %2$d / %3$d min
- Extended bolus
- Multiwave bolus
- %1$.2f / %2$.2f U for %3$d min
- Enable notification of TBR end\n(pump setting)
- Disable notification of TBR end\n(pump setting)
- Pump integration for Accu-Chek Insight pumps
- Not inserted
- Last conn: %1$d min ago
- TBR: %1$d%% for %2$d / %3$d min
- Extended: %1$.2f / %2$.2f U for %3$d min
- Multiwave: %1$.2f / %2$.2f U for %3$d min
- TDD: %1$.2f
- Reser.: %1$.2f U
- Batt.: %1$d%%
- Max. recovery duration [s]
- Min. recovery duration [s]
- Recovery duration
- Timeout during handshake - reset bluetooth
Sun
Sat
Fri
@@ -1260,7 +1125,6 @@
SMB execution time
Temp basal request time
Temp basal execution time
- Insight Pump Alerts
@@ -1381,5 +1245,9 @@
Cannula
User entry
Use values of your largest food you usually eat\n
+ This email address will attached to crash reports so we can contact you in urgent cases. It\'s optional.
+ Email address
+ Privacy setting
+ You can provide optional email address if you want to be notified about app crashes. This is not an automated service. You will be contacted by developers in dangerous situations.
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index b79d02361d..ecfecd2140 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -16,12 +16,6 @@
- @color/dialog_title_icon_tint
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/pref_insight_local_full.xml b/insight/src/main/res/xml/pref_insight_local_full.xml
similarity index 100%
rename from app/src/main/res/xml/pref_insight_local_full.xml
rename to insight/src/main/res/xml/pref_insight_local_full.xml
diff --git a/app/src/main/res/xml/pref_insight_local_pumpcontrol.xml b/insight/src/main/res/xml/pref_insight_local_pumpcontrol.xml
similarity index 100%
rename from app/src/main/res/xml/pref_insight_local_pumpcontrol.xml
rename to insight/src/main/res/xml/pref_insight_local_pumpcontrol.xml
diff --git a/medtronic/src/main/AndroidManifest.xml b/medtronic/src/main/AndroidManifest.xml
index ef3ab38a46..7f19bbfdae 100644
--- a/medtronic/src/main/AndroidManifest.xml
+++ b/medtronic/src/main/AndroidManifest.xml
@@ -5,7 +5,7 @@
+ android:exported="false" />
diff --git a/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/di/MedtronicModule.kt b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/di/MedtronicModule.kt
new file mode 100644
index 0000000000..0a324648e8
--- /dev/null
+++ b/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/di/MedtronicModule.kt
@@ -0,0 +1,23 @@
+package info.nightscout.androidaps.plugins.pump.medtronic.di
+
+import dagger.Module
+import dagger.android.ContributesAndroidInjector
+import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicFragment
+import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager
+import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUITask
+import info.nightscout.androidaps.plugins.pump.medtronic.dialog.MedtronicHistoryActivity
+import info.nightscout.androidaps.plugins.pump.medtronic.dialog.RileyLinkStatusDeviceMedtronic
+import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtronicService
+
+@Module
+@Suppress("unused")
+abstract class MedtronicModule {
+ @ContributesAndroidInjector abstract fun contributesMedtronicHistoryActivity(): MedtronicHistoryActivity
+ @ContributesAndroidInjector abstract fun contributesMedtronicFragment(): MedtronicFragment
+
+ @ContributesAndroidInjector abstract fun contributesRileyLinkMedtronicService(): RileyLinkMedtronicService
+
+ @ContributesAndroidInjector abstract fun medtronicCommunicationManagerProvider(): MedtronicCommunicationManager
+ @ContributesAndroidInjector abstract fun medtronicUITaskProvider(): MedtronicUITask
+ @ContributesAndroidInjector abstract fun contributesRileyLinkStatusDeviceMedtronic(): RileyLinkStatusDeviceMedtronic
+}
\ No newline at end of file
diff --git a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/dagger/OmnipodErosModule.kt b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/dagger/OmnipodErosModule.kt
index 336f123ce3..453f1f7f86 100644
--- a/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/dagger/OmnipodErosModule.kt
+++ b/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/dagger/OmnipodErosModule.kt
@@ -9,8 +9,10 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.data.RLHistoryItemOm
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.PodStateManager
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsErosPodStateManager
import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager
+import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.service.RileyLinkOmnipodService
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.ErosPodHistoryActivity
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.ErosPodManagementActivity
+import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.OmnipodErosOverviewFragment
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.ErosPodActivationWizardActivity
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.ErosPodDeactivationWizardActivity
@@ -19,6 +21,11 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivati
abstract class OmnipodErosModule {
// ACTIVITIES
+
+ @ContributesAndroidInjector
+ abstract fun contributesPodManagementActivity(): ErosPodManagementActivity
+ @ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): ErosPodHistoryActivity
+
@ActivityScope
@ContributesAndroidInjector(modules = [OmnipodWizardModule::class, OmnipodErosWizardViewModelsModule::class])
abstract fun contributesActivationWizardActivity(): ErosPodActivationWizardActivity
@@ -27,14 +34,17 @@ abstract class OmnipodErosModule {
@ContributesAndroidInjector(modules = [OmnipodWizardModule::class, OmnipodErosWizardViewModelsModule::class])
abstract fun contributesDeactivationWizardActivity(): ErosPodDeactivationWizardActivity
+ // FRAGMENTS
+
@ContributesAndroidInjector
- abstract fun contributesPodManagementActivity(): ErosPodManagementActivity
- @ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): ErosPodHistoryActivity
+ abstract fun contributesOmnipodFragment(): OmnipodErosOverviewFragment
// SERVICES
@ContributesAndroidInjector
abstract fun omnipodCommunicationManagerProvider(): OmnipodRileyLinkCommunicationManager
+ @ContributesAndroidInjector
+ abstract fun contributesRileyLinkOmnipodService(): RileyLinkOmnipodService
// DATA
diff --git a/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dagger/RileyLinkModule.kt b/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/di/RileyLinkModule.kt
similarity index 62%
rename from rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dagger/RileyLinkModule.kt
rename to rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/di/RileyLinkModule.kt
index 40227b9269..ac6f4747ce 100644
--- a/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dagger/RileyLinkModule.kt
+++ b/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/di/RileyLinkModule.kt
@@ -1,13 +1,18 @@
-package info.nightscout.androidaps.plugins.pump.common.dagger
+package info.nightscout.androidaps.plugins.pump.common.di
import dagger.Module
import dagger.android.ContributesAndroidInjector
+import info.nightscout.androidaps.plugins.pump.common.dialog.RileyLinkBLEConfigActivity
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.SendAndListen
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.SetPreamble
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioPacket
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse
+import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusActivity
+import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusGeneralFragment
+import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyLinkStatusHistoryFragment
+import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkService
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.*
@Module
@@ -25,4 +30,12 @@ abstract class RileyLinkModule {
@ContributesAndroidInjector abstract fun sendAndListenProvider(): SendAndListen
@ContributesAndroidInjector abstract fun setPreambleProvider(): SetPreamble
@ContributesAndroidInjector abstract fun radioPacketProvider(): RadioPacket
+
+ @ContributesAndroidInjector abstract fun contributesRileyLinkStatusGeneral(): RileyLinkStatusGeneralFragment
+ @ContributesAndroidInjector abstract fun contributesRileyLinkStatusHistoryFragment(): RileyLinkStatusHistoryFragment
+
+ @ContributesAndroidInjector abstract fun contributesRileyLinkStatusActivity(): RileyLinkStatusActivity
+ @ContributesAndroidInjector abstract fun contributesRileyLinkBLEConfigActivity(): RileyLinkBLEConfigActivity
+
+ @ContributesAndroidInjector abstract fun contributesRileyLinkService(): RileyLinkService
}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index c1f4057c12..304e781d25 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,2 +1,14 @@
-include ':app', ':database', ':wear', ':core', ':dana', ':danar', ':danars', ':rileylink', ':medtronic', ':omnipod-common', ':omnipod-eros', ':omnipod-dash'
-
+include ':insight'
+include ':app'
+include ':wear'
+include ':database'
+include ':core'
+include ':combo'
+include ':dana'
+include ':danar'
+include ':danars'
+include ':rileylink'
+include ':medtronic'
+include ':omnipod-common'
+include ':omnipod-eros'
+include ':omnipod-dash'
\ No newline at end of file