|
|
@ -507,15 +507,13 @@ public class MicroPhotoService extends Service {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Register Next Photo Timer
|
|
|
|
// Register Next Photo Timer
|
|
|
|
long startTime = (System.currentTimeMillis() + 999) / 1000 + 1;
|
|
|
|
long startTime = System.currentTimeMillis() / 1000;
|
|
|
|
if (ts != 0 && (startTime - ts) < 86400) {
|
|
|
|
if (startTime < ts) {
|
|
|
|
// Ts != 0 means schedule time
|
|
|
|
// if current time is earlier schedule time
|
|
|
|
// if ts is not during a day, the time is wrong, just use current system time
|
|
|
|
// we will register schedule time after ts
|
|
|
|
// if ts is valid schedule time, will use next time point
|
|
|
|
startTime = ts;
|
|
|
|
Log.e(TAG, "Current Photo Timer(" + ts + ") is wrong and use current system time");
|
|
|
|
|
|
|
|
startTime = ts + 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mService.updateCaptureSchedule(startTime);
|
|
|
|
mService.updateCaptureSchedule(startTime + 1);
|
|
|
|
} else if (TextUtils.equals(ACTION_HEARTBEAT_MANUALLY, action)) {
|
|
|
|
} else if (TextUtils.equals(ACTION_HEARTBEAT_MANUALLY, action)) {
|
|
|
|
Log.i(TAG, "HB Timer Fired ACTION=" + action);
|
|
|
|
Log.i(TAG, "HB Timer Fired ACTION=" + action);
|
|
|
|
mService.sendHeartbeat(mService.mNativeHandle, mService.getSignalLevel());
|
|
|
|
mService.sendHeartbeat(mService.mNativeHandle, mService.getSignalLevel());
|
|
|
|