From: InHong Han Date: Fri, 15 May 2020 06:27:31 +0000 (+0900) Subject: Fix the issue no_sticker message was not delivered after OOBE X-Git-Tag: submit/tizen_5.5/20200515.063955~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7eb1ffdbfc90ebd868b15e2385c6f622ec26e2b3;p=platform%2Fcore%2Fuifw%2Fcapi-ui-sticker.git Fix the issue no_sticker message was not delivered after OOBE Change-Id: I83fde1a99c224f25b345d05a00918fd3143e8dba --- diff --git a/receiver/src/ft.cpp b/receiver/src/ft.cpp index 4e03352..1ab77b0 100644 --- a/receiver/src/ft.cpp +++ b/receiver/src/ft.cpp @@ -634,7 +634,7 @@ static void send_sync_start_response(int result_code) int feature_flag = 0; string response_to_app; switch (result_code) { - case SYNC_START_RSP_SUCCESS || SYNC_START_RSP_BITMOJI_ALL_DELETE: + case SYNC_START_RSP_SUCCESS: { response_to_app = "success"; if (current_request.category == string("arsticker")) @@ -646,6 +646,18 @@ static void send_sync_start_response(int result_code) case SYNC_START_RSP_NO_STICKER: response_to_app = "no_sticker"; break; + case SYNC_START_RSP_BITMOJI_ALL_DELETE: + { + int is_synced = 0; + if (vconf_get_int(VCONFKEY_STICKER_SYNC_COMPLETE, &is_synced) != 0) + LOGW("Failed to read sync completion"); + + if (is_synced == VCONFKEY_STICKER_SYNC_COMPLETE_NONE) + response_to_app = "no_sticker"; + else + response_to_app = "success"; + break; + } default: response_to_app = "unknown_error"; break; @@ -752,9 +764,8 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in int result_code = json_object_get_int_member(root_obj, "resultCode"); LOGD("result : %s, resultCode : %d", result.c_str(), result_code); - send_sync_start_response(result_code); - if(result_code == SYNC_START_RSP_SUCCESS) { + send_sync_start_response(result_code); if (current_request.category == string("bitmoji")) { LOGD("Delete all bitmoji stickers"); if (create_sticker_provider_handle() == STICKER_ERROR_NONE) { @@ -762,7 +773,15 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in destroy_sticker_provider_handle(); } } - } else if (result_code == SYNC_START_RSP_NO_STICKER) { + } else { + if (result_code == SYNC_START_RSP_BITMOJI_ALL_DELETE) { + LOGD("Delete all bitmoji stickers"); + if (create_sticker_provider_handle() == STICKER_ERROR_NONE) { + delete_all_bitmoji_stickers(); + destroy_sticker_provider_handle(); + } + } + if (!process_request_queue()) { #ifdef VCONFKEY_STICKER_SUPPORTED_FEATURE int feature_flag = 0; @@ -788,23 +807,10 @@ on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned in LOGW("No vconf supported feature"); #endif /* VCONFKEY_STICKER_SUPPORTED_FEATURE */ + send_sync_start_response(result_code); set_sync_progressing(FALSE); save_last_sync_time(); - quit(); - } - } else if (result_code == SYNC_START_RSP_BITMOJI_ALL_DELETE) { - LOGD("Delete all bitmoji stickers"); - if (create_sticker_provider_handle() == STICKER_ERROR_NONE) { - delete_all_bitmoji_stickers(); - destroy_sticker_provider_handle(); - } - - set_sync_progressing(FALSE); - save_last_sync_time(); - - if (!process_request_queue()) { - sync_success_cnt = 0; quit(); } }