Skip to content

armgit / haven

Public Imported from GitHub
0

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors

move barometer and light sensor out from accelerometer preference

n8fr8a21a0ca609f9
diff --git a/src/main/java/org/havenapp/main/service/MonitorService.java b/src/main/java/org/havenapp/main/service/MonitorService.java
index 465a328..c2d4602 100644
--- a/src/main/java/org/havenapp/main/service/MonitorService.java
+++ b/src/main/java/org/havenapp/main/service/MonitorService.java
@@ -231,10 +231,12 @@ public class MonitorService extends Service {
if(Build.VERSION.SDK_INT>=18) {
mBumpMonitor = new BumpMonitor(this);
}
- mBaroMonitor = new BarometerMonitor(this);
- mLightMonitor = new AmbientLightMonitor(this);
}
+ //moving these out of the accelerometer pref, but need to enable off prefs for them too
+ mBaroMonitor = new BarometerMonitor(this);
+ mLightMonitor = new AmbientLightMonitor(this);
+
if (mPrefs.getMicrophoneSensitivity() != PreferenceManager.OFF)
mMicMonitor = new MicrophoneMonitor(this);
@@ -252,10 +254,12 @@ public class MonitorService extends Service {
if(Build.VERSION.SDK_INT>=18) {
mBumpMonitor.stop(this);
}
- mBaroMonitor.stop(this);
- mLightMonitor.stop(this);
}
+ //moving these out of the accelerometer pref, but need to enable off prefs for them too
+ mBaroMonitor.stop(this);
+ mLightMonitor.stop(this);
+
if (mPrefs.getMicrophoneSensitivity() != PreferenceManager.OFF)
mMicMonitor.stop(this);
}