#define STICKER_SEND_STOP_REQ "sticker-send-stop-req"
#define STICKER_SEND_STOP_RSP "sticker-send-stop-rsp"
+#ifndef VCONFKEY_STICKER_SYNC_COMPLETE_DONE
+#define VCONFKEY_STICKER_SYNC_COMPLETE_DONE 0x1
+#endif
+
using namespace std;
enum {
}
else {
int complete_flags = 0;
- if (vconf_get_int(VCONFKEY_STICKER_SYNC_COMPLETE, &complete_flags) == 0) {
- if (sticker_data.group == string("arsticker"))
- complete_flags |= 0x1;
- else if (sticker_data.group == string("bitmoji"))
- complete_flags |= 0x2;
-
- LOGD("sync complete flag : %x", complete_flags);
-
- if (vconf_set_int(VCONFKEY_STICKER_SYNC_COMPLETE, complete_flags) == 0)
- LOGD("Succeed to set sync complete");
- else
- LOGW("Fail to set sync complete");
- }
- else {
- LOGW("Failed to get sticker sync flags");
+
+ int feature_flag = 0;
+ if (vconf_get_int(VCONFKEY_STICKER_SYNC_COMPLETE, &complete_flags) == 0 && complete_flags == 0) {
+#ifdef VCONFKEY_STICKER_SUPPORTED_FEATURE
+ if (vconf_get_int(VCONFKEY_STICKER_SUPPORTED_FEATURE, &feature_flag) == 0) {
+ if (feature_flag == VCONFKEY_STICKER_FEATURE_AREMOJI) {
+ if (sticker_data.group == string("arsticker")) {
+ complete_flags = VCONFKEY_STICKER_SYNC_COMPLETE_DONE;
+ }
+ }
+ else if (feature_flag & VCONFKEY_STICKER_FEATURE_BITMOJI) {
+ if (sticker_data.group == string("bitmoji")) {
+ complete_flags = VCONFKEY_STICKER_SYNC_COMPLETE_DONE;
+ }
+ }
+
+ LOGD("sync complete flag : %x", complete_flags);
+
+ if (vconf_set_int(VCONFKEY_STICKER_SYNC_COMPLETE, complete_flags) == 0)
+ LOGD("Succeed to set sync complete");
+ else
+ LOGW("Fail to set sync complete");
+ }
+#endif /* VCONFKEY_STICKER_SUPPORTED_FEATURE */
}
json_object_set_string_member(j_object, "result", "success");