From: taekeun.kang Date: Tue, 8 Sep 2015 12:04:18 +0000 (+0900) Subject: [Messaging-Email] add checking codes whether telephony is supported or not X-Git-Tag: submit/tizen/20150909.024403^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9f07db16ca250d9d58f1e2615e8f4a613cd1183;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Messaging-Email] add checking codes whether telephony is supported or not TCT Results Pass 290 Fail 2 Block 16 N/A 0 Change-Id: Iaf0da34b2e1553fcce5720f4400ab4d8ee805ef8 Signed-off-by: taekeun.kang --- diff --git a/src/messaging/messaging_instance.cc b/src/messaging/messaging_instance.cc index 33d880f8..99f3d03c 100755 --- a/src/messaging/messaging_instance.cc +++ b/src/messaging/messaging_instance.cc @@ -18,6 +18,7 @@ #include #include +#include #include "common/logger.h" @@ -221,11 +222,18 @@ void MessagingInstance::MessageServiceSendMessage(const picojson::value& args, simIndex = static_cast (MessagingUtil::getValueFromJSONObject(data,SEND_MESSAGE_ARGS_SIMINDEX)); - if (!callback->setSimIndex(simIndex)) { - delete callback; - callback = nullptr; - POST_AND_RETURN(PlatformResult(ErrorCode::UNKNOWN_ERR, "set sim index failed"), - json, obj, JSON_CALLBACK_ERROR) + bool cell_support = false; + system_info_get_platform_bool("http://tizen.org/feature/network.telephony", &cell_support); + if (cell_support) { + LoggerD("cell_support is true"); + if (!callback->setSimIndex(simIndex)) { + delete callback; + callback = nullptr; + POST_AND_RETURN(PlatformResult(ErrorCode::UNKNOWN_ERR, "set sim index failed"), + json, obj, JSON_CALLBACK_ERROR) + } + } else { + LoggerD("cell_support is false"); } queue_.add(static_cast(callbackId), PostPriority::HIGH);