On start, show notification if on dev-branch, but not EM, so CL is disabled.
This commit is contained in:
parent
090e1b13f8
commit
637b0c6189
2 changed files with 8 additions and 0 deletions
|
@ -47,6 +47,8 @@ import info.nightscout.androidaps.plugins.OpenAPSAMA.OpenAPSAMAPlugin;
|
|||
import info.nightscout.androidaps.plugins.OpenAPSMA.OpenAPSMAPlugin;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSSMB.OpenAPSSMBPlugin;
|
||||
import info.nightscout.androidaps.plugins.Overview.OverviewPlugin;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
|
||||
import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
|
||||
import info.nightscout.androidaps.plugins.Persistentnotification.PersistentNotificationPlugin;
|
||||
import info.nightscout.androidaps.plugins.ProfileLocal.LocalProfilePlugin;
|
||||
import info.nightscout.androidaps.plugins.ProfileNS.NSProfilePlugin;
|
||||
|
@ -201,6 +203,11 @@ public class MainApp extends Application {
|
|||
|
||||
engineeringMode = new File(System.getProperty("EXT_FILES_DIR"),"engineering_mode").canRead();
|
||||
devBranch = BuildConfig.VERSION.contains("dev");
|
||||
|
||||
if (devBranch && !engineeringMode) {
|
||||
Notification n = new Notification(Notification.TOAST_ALARM, gs(R.string.closed_loop_disabled_on_dev_branch), Notification.NORMAL);
|
||||
bus().post(new EventNewNotification(n));
|
||||
}
|
||||
}
|
||||
|
||||
private void registerLocalBroadcastReceiver() {
|
||||
|
|
|
@ -969,5 +969,6 @@
|
|||
<string name="fabric_upload">Fabric Upload</string>
|
||||
<string name="allow_automated_crash_reporting">Allow automated crash reporting and feature usage data to be sent to the developers via the fabric.io service.</string>
|
||||
<string name="g5appnotdetected">Please update your G5 app to supported version</string>
|
||||
<string name="closed_loop_disabled_on_dev_branch">Running dev version. Closed loop is disabled</string>
|
||||
</resources>
|
||||
|
||||
|
|
Loading…
Reference in a new issue