#include "log.h"
#include "config.h"
#include "receiver_preference.h"
+#include "sticker_info.h"
using namespace std;
}
}
+ create_sticker_provider_handle();
+
return true;
}
}
// compare time
- LOGD("current time : %f, last_sync_time : %f", ecore_time_get(), last_sync_time);
- if (ecore_time_get() - last_sync_time > SYNC_INTERVAL)
- result = true;
- else
+ LOGD("current time : %f, last_sync_time : %f", ecore_time_unix_get(), last_sync_time);
+
+ if (ecore_time_unix_get() - last_sync_time > MAX_WAIT_TIME) {
+ LOGD("Starting manual synchronization");
+ initialize_sap();
+ request_show_sync_notification();
result = false;
+ } else {
+ if (ecore_time_unix_get() - last_sync_time > SYNC_INTERVAL)
+ result = true;
+ else
+ result = false;
+ }
}
else
{
if (!is_init_sap()) {
if (check_sync_time_condition()) {
if (check_battery_condition()) {
+ LOGD("Starting auto synchronization");
initialize_sap();
request_all_sticker_data("auto", "input");
}
{
/* Release all resources. */
LOGD("");
+ destroy_sticker_provider_handle();
deinitialize_sap();
}