summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjk.pu <jk.pu@samsung.com>2015-09-09 10:56:41 +0900
committerjk.pu <jk.pu@samsung.com>2015-09-09 10:56:41 +0900
commit129e627ab6402529c183979981ed6cfb4eeb58a8 (patch)
tree027bb78837fe198664e168ac8bbdb2d5197e6976
parent7c2c24525ac7d844ce8b4d83c63c08da4c54661a (diff)
parente9f07db16ca250d9d58f1e2615e8f4a613cd1183 (diff)
downloadwebapi-plugins-tizen_3.0.m1_mobile.tar.gz
webapi-plugins-tizen_3.0.m1_mobile.tar.bz2
webapi-plugins-tizen_3.0.m1_mobile.zip
-rwxr-xr-xsrc/messaging/messaging_instance.cc18
1 files changed, 13 insertions, 5 deletions
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 <sstream>
#include <stdexcept>
+#include <system_info.h>
#include "common/logger.h"
@@ -221,11 +222,18 @@ void MessagingInstance::MessageServiceSendMessage(const picojson::value& args,
simIndex = static_cast<long>
(MessagingUtil::getValueFromJSONObject<double>(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<long>(callbackId), PostPriority::HIGH);