Commit 91e311f4 authored by Craig Earley's avatar Craig Earley
Browse files

adds explicit 100-minute timeout to wakelock

parent 2a900c37
......@@ -251,7 +251,7 @@ public class SensorSampleService extends Service implements SensorEventListener
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
mWakeLock = Objects.requireNonNull(pm).newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "fieldday:samplingwakelock");
mWakeLock.acquire();
mWakeLock.acquire(100*60*1000L /*100 minutes*/);
if (sampleOnce) {
Log.d(TAG, "writeToDB.");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment