Modified to change the vconf flag when any of the stickers are synchronized 80/232580/5
authorInHong Han <inhong1.han@samsung.com>
Wed, 6 May 2020 11:45:33 +0000 (20:45 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 7 May 2020 01:35:37 +0000 (01:35 +0000)
Change-Id: I72bc6eebd322e5f06501e4132c44819883a58367

receiver/src/ft.cpp

index b375757..0d8fade 100644 (file)
@@ -815,36 +815,12 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in
         json_object_set_string_member(j_object, "msgId", STICKER_SEND_STOP_RSP);
         json_object_set_int_member(j_object, "tID", t_id);
 
-        if (reason == "complete" && rec_file_cnt_in_group != file_len) {
-            json_object_set_string_member(j_object, "result", "failure");
-        }
-        else {
+        if (reason == "complete" && rec_file_cnt_in_group == file_len) {
             int feature_flag = 0;
 
 #ifdef VCONFKEY_STICKER_SUPPORTED_FEATURE
-            if (vconf_get_int(VCONFKEY_STICKER_SUPPORTED_FEATURE, &feature_flag) == 0)
-            {
-                LOGD("feature : %d, current request category : %s", feature_flag, current_request.category.c_str());
-                if (feature_flag == VCONFKEY_STICKER_FEATURE_AREMOJI)
-                {
-                    if (current_request.category == string("arsticker"))
-                    {
-                        set_sync_complete();
-                        set_sync_progressing(FALSE);
-                    }
-                }
-                else if (feature_flag & VCONFKEY_STICKER_FEATURE_BITMOJI)
-                {
-                    if (current_request.category == string("bitmoji"))
-                    {
-                        set_sync_complete();
-                        set_sync_progressing(FALSE);
-                    }
-                }
-            }
-            else {
-                LOGW("Failed to read support feature");
-            }
+            set_sync_complete();
+            set_sync_progressing(FALSE);
 #else
             LOGW("No vconf supported feature");
 #endif /* VCONFKEY_STICKER_SUPPORTED_FEATURE */
@@ -852,6 +828,9 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in
             json_object_set_string_member(j_object, "result", "success");
             sync_success_cnt++;
         }
+        else {
+            json_object_set_string_member(j_object, "result", "failure");
+        }
 
         if (_send_json_data(j_object) == FALSE)
             LOGE("Failed to send message");