Fix boolean stuff in accordance to code review with adrian

This commit is contained in:
Markus M. May 2018-03-17 21:35:16 +01:00
parent 0d4e8772a9
commit c6e8ab35b6
2 changed files with 2 additions and 2 deletions

View file

@ -208,7 +208,7 @@ public class MainApp extends Application {
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile();
devBranch = BuildConfig.VERSION.contains("dev");
if (devBranch && !engineeringMode) {
if (!isDevModeOrRelease()) {
Notification n = new Notification(Notification.TOAST_ALARM, gs(R.string.closed_loop_disabled_on_dev_branch), Notification.NORMAL);
bus().post(new EventNewNotification(n));
}

View file

@ -102,7 +102,7 @@ public class SafetyPlugin implements PluginBase, ConstraintsInterface {
**/
@Override
public boolean isClosedModeEnabled() {
if (MainApp.devBranch && !MainApp.engineeringMode) return false;
if (!MainApp.isDevModeOrRelease()) return false;
String mode = SP.getString("aps_mode", "open");
return mode.equals("closed") && BuildConfig.CLOSEDLOOP;
}