Fix the issue that sticker synchronization is failed when REQUEST_SYNC message is... 80/230180/2
authorInHong Han <inhong1.han@samsung.com>
Wed, 8 Apr 2020 08:56:00 +0000 (17:56 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 8 Apr 2020 09:58:08 +0000 (18:58 +0900)
Change-Id: I059241ca2f9ef5262c02f7b8b14fb6b32c0ae964

receiver/src/ft.cpp

index aaef4c3..ef2b771 100644 (file)
@@ -415,10 +415,12 @@ void request_all_sticker_data(const char *mode, const char *type)
     if (vconf_get_int(VCONFKEY_STICKER_SUPPORTED_FEATURE, &feature_flag) == 0)
     {
         if (feature_flag & VCONFKEY_STICKER_FEATURE_AREMOJI)
-            request_sticker_data(mode, "arsticker", type);
+            if (!request_sticker_data(mode, "arsticker", type))
+                LOGW("Failed to request ar_sticker sync");
 
         if (feature_flag & VCONFKEY_STICKER_FEATURE_BITMOJI)
-            request_sticker_data(mode, "bitmoji", type);
+            if (!request_sticker_data(mode, "bitmoji", type))
+                LOGW("Failed to request bitmoji sync");
     }
     else
         LOGW("Failed to get value of VCONFKEY_STICKER_SUPPORTED_FEATURE");
@@ -599,8 +601,7 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in
     json_msgid = json_object_get_string_member(root_obj, "msgId");
     msg_id = string(json_msgid ? json_msgid : "");
     if (msg_id == STICKER_REQUEST_SYNC_REQ) {
-        if (!request_sticker_data(current_request.mode.c_str(), current_request.category.c_str(), current_request.type.c_str()))
-            LOGW("Failed to request sticker sync");
+        request_all_sticker_data("auto", "input");
     } else if (msg_id == STICKER_SYNC_FEATURE_RSP) {
         LOGD("msg : %s", msg_id.c_str());
 #ifdef VCONFKEY_STICKER_SUPPORTED_FEATURE