Update change log and spec for wrt-plugins-tizen_0.4.49
[framework/web/wrt-plugins-tizen.git] / src / Systeminfo / Systeminfo.cpp
index b804699..8f49a1c 100755 (executable)
 // limitations under the License.
 //
 
-#include <fstream>
 #include <stddef.h>
 #include <cassert>
-#include <pcrecpp.h>
-#include <dpl/log/log.h>
 #include <math.h>
 #include <Commons/Exception.h>
 #include <CommonsJavaScript/Converter.h>
 #include <CommonsJavaScript/PrivateObject.h>
+#include <TimeTracer.h>
 #include "Systeminfo.h"
+#include <Logger.h>
 
 using namespace WrtDeviceApis::CommonsJavaScript;
 using namespace WrtDeviceApis::Commons;
-using namespace DPL;
+#define SIM_VALUE_MAX    4
 
 namespace DeviceAPI {
 namespace Systeminfo {
@@ -49,6 +48,13 @@ void PeripheralValueCallback(keynode_t *node, void *event_ptr)
     }
 }
 
+void CellularNetworkValueCallback(keynode_t *node, void *event_ptr)
+{
+    if(event_ptr) {
+        ((Systeminfo*)event_ptr)->getWatchValue(WATCH_TYPE_CELLULARNETWORK);
+    }
+}
+
 void DisplayValueCallback(keynode_t *node, void* event_ptr)
 {
     if(event_ptr) {
@@ -56,6 +62,14 @@ void DisplayValueCallback(keynode_t *node, void* event_ptr)
     }
 }
 
+void OrientationValueVconfCallback(keynode_t *node, void *event_ptr)
+{
+    LoggerD("enter");
+    if(event_ptr) {
+        ((Systeminfo*)event_ptr)->getWatchValue(WATCH_TYPE_DEVICE_ORIENTATION);
+    }    
+}
+
 void NetworkTypeValueCallback(connection_type_e type, void* event_ptr)
 {
     if(event_ptr) {
@@ -88,7 +102,6 @@ static Eina_Bool CpuValueCallback(void* event_ptr)
 
 void OrientationValueCallback(unsigned int event_type, sensor_event_data_t *event , void *event_ptr)
 {
-    LogDebug("enter");
     if(event_ptr) {
         ((Systeminfo*)event_ptr)->getWatchValue(WATCH_TYPE_DEVICE_ORIENTATION);
     }
@@ -96,10 +109,111 @@ void OrientationValueCallback(unsigned int event_type, sensor_event_data_t *even
 
 void localeChangedCallback(runtime_info_key_e key, void* event_ptr)
 {
-    LogDebug("enter");
     if(event_ptr) {
         ((Systeminfo*)event_ptr)->getWatchValue(WATCH_TYPE_LOCALE);
-    }    
+    }
+}
+
+void SimCphsValueCallback(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimAccessResult_t access_rt = (TelSimAccessResult_t)result;
+       TelSimCphsNetName_t *cphsInfo = (TelSimCphsNetName_t *)data;
+
+    LoggerD("access_rt : " << access_rt);
+
+    if (user_data != NULL){
+        SysteminfoAsyncPendingEvent *pendingEvent = (SysteminfoAsyncPendingEvent *)user_data;
+        Systeminfo *systeminfo = (Systeminfo *)pendingEvent->getThisObject();
+        EventGetSysteminfoPtr event = pendingEvent->getEvent();
+
+        if (access_rt == TAPI_SIM_ACCESS_SUCCESS) {
+            if (cphsInfo->full_name) {
+            systeminfo->setSimValue(SIM_CPHS_VALUE, (char *)cphsInfo->full_name, event);
+            } else if (cphsInfo->short_name) {
+                systeminfo->setSimValue(SIM_CPHS_VALUE, (char *)cphsInfo->short_name, event);
+            } else {
+                systeminfo->setSimValue(SIM_CPHS_VALUE, NULL, event);                    
+            }
+        } else {
+            systeminfo->setSimValue(SIM_CPHS_VALUE, NULL, event);        
+        }
+
+        delete pendingEvent;
+        pendingEvent = NULL;
+        user_data = NULL;
+    }
+}
+
+void SimMsisdnValueCallback(TapiHandle *handle, int result, void *data, void *user_data)
+{
+       TelSimAccessResult_t access_rt = (TelSimAccessResult_t)result;
+       TelSimMsisdnList_t *msisdnInfo = (TelSimMsisdnList_t *)data;
+
+    LoggerD("access_rt : " << access_rt);
+
+    if (user_data != NULL){
+        SysteminfoAsyncPendingEvent *pendingEvent = (SysteminfoAsyncPendingEvent *)user_data;
+        Systeminfo *systeminfo = (Systeminfo *)pendingEvent->getThisObject();
+        EventGetSysteminfoPtr event = pendingEvent->getEvent();
+
+        if (access_rt == TAPI_SIM_ACCESS_SUCCESS) {
+            systeminfo->setSimValue(SIM_MSISDN_VALUE, (char *)msisdnInfo->list[0].num, event);
+        } else {
+            systeminfo->setSimValue(SIM_MSISDN_VALUE, NULL, event);        
+        }
+
+        delete pendingEvent;
+        pendingEvent = NULL;
+        user_data = NULL;
+    }
+}
+
+void SimIccidValueCallback(TapiHandle *handle, int result, void *data, void *user_data)
+{
+    TelSimAccessResult_t access_rt = (TelSimAccessResult_t)result;
+       TelSimIccIdInfo_t *iccidInfo = (TelSimIccIdInfo_t *)data;
+
+    LoggerD("access_rt : " << access_rt);
+
+    if (user_data != NULL){
+        SysteminfoAsyncPendingEvent *pendingEvent = (SysteminfoAsyncPendingEvent *)user_data;
+        Systeminfo *systeminfo = (Systeminfo *)pendingEvent->getThisObject();
+        EventGetSysteminfoPtr event = pendingEvent->getEvent();
+
+        if (access_rt == TAPI_SIM_ACCESS_SUCCESS) {
+            systeminfo->setSimValue(SIM_ICCID_VALUE, (char *)iccidInfo->icc_num, event);
+        } else {
+            systeminfo->setSimValue(SIM_ICCID_VALUE, NULL, event);        
+        }
+
+        delete pendingEvent;
+        pendingEvent = NULL;
+        user_data = NULL;
+    }
+}
+
+void SimSpnValueCallback(TapiHandle *handle, int result, void *data, void *user_data)
+{
+    TelSimAccessResult_t access_rt = (TelSimAccessResult_t)result;
+    TelSimSpn_t *spnInfo = (TelSimSpn_t *)data;
+
+    LoggerD("access_rt : " << access_rt);
+
+    if (user_data != NULL){
+        SysteminfoAsyncPendingEvent *pendingEvent = (SysteminfoAsyncPendingEvent *)user_data;
+        Systeminfo *systeminfo = (Systeminfo *)pendingEvent->getThisObject();
+        EventGetSysteminfoPtr event = pendingEvent->getEvent();
+        
+        if (access_rt == TAPI_SIM_ACCESS_SUCCESS) {
+            systeminfo->setSimValue(SIM_SPN_VALUE, (char *)spnInfo->spn, event);
+        } else {
+            systeminfo->setSimValue(SIM_ICCID_VALUE, NULL, event);        
+        }
+
+        delete pendingEvent;
+        pendingEvent = NULL;
+        user_data = NULL;
+    }
 }
 
 }
@@ -150,22 +264,27 @@ Systeminfo::Systeminfo() : m_networkRegist(REGIST_NOT),
     int ret = connection_create(&m_connectionHandle);
 
        if (CONNECTION_ERROR_NONE == ret) {
-               LogDebug("Network Client registration success");
+               LoggerD("Network Client registration success");
        } else {
-               LogDebug("Network Client registration success");
+               LoggerD("Network Client registration success");
         m_connectionHandle = NULL;
     }
 
     m_sensorHandle = sf_connect(ACCELEROMETER_SENSOR);
     if (m_sensorHandle < 0) {
-        LogDebug ("sensor attach fail");
+        LoggerD ("sensor attach fail");
     } else {
-        LogDebug("m_sensorHandle : " << m_sensorHandle);
+        LoggerD("m_sensorHandle : " << m_sensorHandle);
         int state = sf_start(m_sensorHandle, 0);
         if(state < 0) {
-            LogDebug("failed");
+            LoggerD("failed");
         }
     }
+
+    m_tapiHandle = tel_init(0);
+    if (m_tapiHandle == NULL) {
+        LoggerE ("tel init fail");
+    }
 }
 
 Systeminfo::~Systeminfo()
@@ -184,274 +303,46 @@ Systeminfo::~Systeminfo()
     m_EventMgrPtr->clearAllEvent();
 
     if(m_connectionHandle != NULL) {
-        LogDebug("Network Client deregistration success");
+        LoggerD("Network Client deregistration success");
         connection_destroy(m_connectionHandle);
     } else {
-        LogDebug("Network Client deregistration failed");
+        LoggerD("Network Client deregistration failed");
+    }
+
+    if (m_tapiHandle != NULL) {
+        tel_deinit(m_tapiHandle);
     }
 
        state = sf_stop(m_sensorHandle);
-       LogDebug("handle 1  state = " << state);
+       LoggerD("handle 1  state = " << state);
 
        state = sf_disconnect(m_sensorHandle);
-       LogDebug("handle  state =" << state);
+       LoggerD("handle  state =" << state);
 }
 
 DeviceCapabilitiesPropertiesPtr Systeminfo::getCapabilities()
 {
-    LogDebug("enter");
+    LoggerD("enter");
     DeviceCapabilitiesPropertiesPtr deviceCapabilities(new DeviceCapabilitiesProperties());
-    bool bluetooth = false, nfc = false, wifi = false, wifiDirect = false, fmRadio = false, cameraFront = false,
-        cameraFrontFlash = false, cameraBack = false, cameraBackFlash = false, isAccelerometer = false, isGyroscope = false,
-        isMagnetometer = false, isProximity = false, location = false, locationGps = false, locationWps = false, 
-        microphone = false, usbHost = false, usbAccessory = false, screenOutputRca = false, screenOutputHdmi = false,
-        sipVoip = false, speechRecognition = false, isBarometer = false;
-    int multiTouchCount = 0;
-    char* inputKeyboard = NULL;
-    char* platformVersion = NULL;
-    char* platformName = NULL;
-    char* platformCoreCpuArch = NULL;
-    char* platformCoreFpuArch = NULL;
-    char* duid = NULL;
-    char* openglesVersion = NULL;
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_BLUETOOTH_SUPPORTED, &bluetooth) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("bluetooth : " << bluetooth);
-        deviceCapabilities->bluetooth = bluetooth;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_NFC_SUPPORTED, &nfc) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("nfc : " << nfc);
-        deviceCapabilities->nfc = nfc;
-    }
-    if (system_info_get_value_int(SYSTEM_INFO_KEY_MULTI_POINT_TOUCH_COUNT, &multiTouchCount) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("multiTouchCount : " << multiTouchCount);
-        deviceCapabilities->multiTouchCount = multiTouchCount;
-    }
-
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_KEYBOARD_TYPE, &inputKeyboard) == SYSTEM_INFO_ERROR_NONE) {
-        if (inputKeyboard != NULL) {
-            LogDebug("inputKeyboard : " << inputKeyboard);
-            deviceCapabilities->inputKeyboard = inputKeyboard;
-            free(inputKeyboard);
-        }
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_WIFI_SUPPORTED, &wifi) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("wifi : " << wifi);
-        deviceCapabilities->wifi = wifi;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_WIFI_DIRECT_SUPPORTED, &wifiDirect) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("wifiDirect : " << wifiDirect);
-        deviceCapabilities->wifiDirect = wifiDirect;
-    }
-
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_OPENGLES_VERSION, &openglesVersion) == SYSTEM_INFO_ERROR_NONE) {
-        if (openglesVersion!= NULL) {
-            LogDebug("openglesVersion : " << openglesVersion);
-            if (strcmp(openglesVersion, "1.0") == 0) {
-                deviceCapabilities->openglesVersion1_1 = true;
-                deviceCapabilities->openglesVersion2_0 = false;
-            } else if (strcmp(openglesVersion, "2.0") == 0) {
-                deviceCapabilities->openglesVersion1_1 = false;
-                deviceCapabilities->openglesVersion2_0 = true;
-            } else if (strcmp(openglesVersion, "1.0/2.0") == 0) {
-                deviceCapabilities->openglesVersion1_1 = true;
-                deviceCapabilities->openglesVersion2_0 = true;
-            }
-            free(openglesVersion);
-        }
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_FMRADIO_SUPPORTED, &fmRadio) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("fmRadio : " << fmRadio);
-        deviceCapabilities->fmRadio = fmRadio;
-    }
-
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_TIZEN_VERSION, &platformVersion) == SYSTEM_INFO_ERROR_NONE) {
-        if (platformVersion) {
-            LogDebug("platformVersion : " << platformVersion);
-            deviceCapabilities->platformVersion = platformVersion;
-            free(platformVersion);
-        }
-    }
-
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_PLATFORM_NAME, &platformName) == SYSTEM_INFO_ERROR_NONE) {
-        if (platformName) {
-            LogDebug("platformName : " << platformName);
-            deviceCapabilities->platformName = platformName;
-            free(platformName);
-        }
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_FRONT_CAMERA_SUPPORTED, &cameraFront) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("cameraFront : " << cameraFront);
-        deviceCapabilities->cameraFront = cameraFront;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_FRONT_CAMERA_FLASH_SUPPORTED, &cameraFrontFlash) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("cameraFrontFlash : " << cameraFrontFlash);
-        deviceCapabilities->cameraFrontFlash = cameraFrontFlash;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_BACK_CAMERA_SUPPORTED, &cameraBack) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("cameraBack : " << cameraBack);
-        deviceCapabilities->cameraBack = cameraBack;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_BACK_CAMERA_FLASH_SUPPORTED, &cameraBackFlash) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("cameraBackFlash : " << cameraBackFlash);
-        deviceCapabilities->cameraBackFlash = cameraBackFlash;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_CPS_SUPPORTED, &location) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("location : " << location);
-        deviceCapabilities->location = location;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_GPS_SUPPORTED, &locationGps) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("locationGps : " << locationGps);
-        deviceCapabilities->locationGps = locationGps;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_WPS_SUPPORTED, &locationWps) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("locationWps : " << locationWps);
-        deviceCapabilities->locationWps = locationWps;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_MICROPHONE_SUPPORTED, &microphone) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("microphone : " << microphone);
-        deviceCapabilities->microphone = microphone;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_USB_HOST_SUPPORTED, &usbHost) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("usbHost : " << usbHost);
-        deviceCapabilities->usbHost = usbHost;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_USB_ACCESSORY_SUPPORTED, &usbAccessory) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("usbAccessory : " << usbAccessory);
-        deviceCapabilities->usbAccessory = usbAccessory;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_RCA_SUPPORTED, &screenOutputRca) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("screenOutputRca : " << screenOutputRca);
-        deviceCapabilities->screenOutputRca = screenOutputRca;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_HDMI_SUPPORTED, &screenOutputHdmi) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("screenOutputHdmi : " << screenOutputHdmi);
-        deviceCapabilities->screenOutputHdmi = screenOutputHdmi;
-    }
-
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_CORE_CPU_ARCH, &platformCoreCpuArch) == SYSTEM_INFO_ERROR_NONE) {
-        if (platformCoreCpuArch) {
-            LogDebug("platformCoreCpuArch : " << platformCoreCpuArch);
-            deviceCapabilities->platformCoreCpuArch = platformCoreCpuArch;
-            free(platformCoreCpuArch);
-        }
-    }
-
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_CORE_FPU_ARCH, &platformCoreFpuArch) == SYSTEM_INFO_ERROR_NONE) {
-        if (platformCoreFpuArch) {
-            LogDebug("platformCoreFpuArch : " << platformCoreFpuArch);
-            deviceCapabilities->platformCoreFpuArch = platformCoreFpuArch;
-            free(platformCoreFpuArch);
-        }
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_SIP_VOIP_SUPPORTED, &sipVoip) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("sipVoip : " << sipVoip);
-        deviceCapabilities->sipVoip = sipVoip;
-    }
-
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_DEVICE_UUID, &duid) == SYSTEM_INFO_ERROR_NONE) {
-        if (duid) {
-            LogDebug("duid : " << duid);
-            deviceCapabilities->duid = duid;
-            free(duid);
-        }
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_SPEECH_RECOGNITION_SUPPORTED, &speechRecognition) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("speechRecognition : " << speechRecognition);
-        deviceCapabilities->speechRecognition = speechRecognition;
-    }
-
-    if (system_info_get_value_bool(SYSTEM_INFO_KEY_BAROMETER_SENSOR_SUPPORTED, &isBarometer) == SYSTEM_INFO_ERROR_NONE) {
-        LogDebug("barometer : " << isBarometer);
-        deviceCapabilities->barometer = isBarometer;
-    }
-
-    if (sensor_is_supported(SENSOR_ACCELEROMETER, &isAccelerometer) == SENSOR_ERROR_NONE) {
-        LogDebug("accelerometer : " << isAccelerometer);
-        deviceCapabilities->accelerometer = isAccelerometer;
-    }
-
-    if (sensor_is_supported(SENSOR_MAGNETIC, &isMagnetometer) == SENSOR_ERROR_NONE) {
-        LogDebug("magnetometer : " << isMagnetometer);
-        deviceCapabilities->magnetometer = isMagnetometer;
-    }
-
-    if (sensor_is_supported(SENSOR_GYROSCOPE, &isGyroscope) == SENSOR_ERROR_NONE) {
-        LogDebug("gyroscope : " << isGyroscope);
-        deviceCapabilities->gyroscope = isGyroscope;
-    }
-
-    if (sensor_is_supported(SENSOR_PROXIMITY, &isProximity) == SENSOR_ERROR_NONE) {
-        LogDebug("proximity : " << isProximity);
-        deviceCapabilities->proximity = isProximity;
-    }
-
-    std::ifstream file("/usr/etc/system-info.ini");
-    std::string line;
-    std::string webApiVersionMajor = "";
-    std::string webApiVersionMinor = "";
-    std::string nativeApiVersionMajor = "";
-    std::string nativeApiVersionMinor = "";
-
-    if(!file) {
-        LogDebug("api/native version info file not found");
-    } else {
-        while ((std::getline(file, line).rdstate() & (std::ifstream::failbit | std::ifstream::eofbit)) == 0) {
-            if (pcrecpp::RE("platform.native.api.version=(\\w+).(\\w+)").PartialMatch(line, &nativeApiVersionMajor, &nativeApiVersionMinor )) {
-                deviceCapabilities->nativeApiVersion = nativeApiVersionMajor;
-                deviceCapabilities->nativeApiVersion += ".";
-                deviceCapabilities->nativeApiVersion += nativeApiVersionMinor;
-                LogDebug("native api version : " << deviceCapabilities->nativeApiVersion);
-                break;
-            }
-        }
-        while ((std::getline(file, line).rdstate() & (std::ifstream::failbit | std::ifstream::eofbit)) == 0) {
-            if (pcrecpp::RE("platform.web.api.version=(\\w+).(\\w+)").PartialMatch(line, &webApiVersionMajor, &webApiVersionMinor)) {
-                deviceCapabilities->webApiVersion = webApiVersionMajor;
-                deviceCapabilities->webApiVersion += ".";
-                deviceCapabilities->webApiVersion += webApiVersionMinor;
-                LogDebug("web api version : " << deviceCapabilities->webApiVersion);
-                break;
-            }
-        }
-        file.close();    
-    }  
-
     return deviceCapabilities;
 }
 
 void Systeminfo::get(const EventGetSysteminfoPtr& event)
 {
+    event->setTapiHandle((void*)m_tapiHandle);
     EventRequestReceiver<EventGetSysteminfo>::PostRequest(event);
 }
 
 void Systeminfo::watch(const EventWatchSysteminfoPtr& event)
 {
     if(event->getWatchType() == WATCH_TYPE_UNKNOWN) {
-        LogDebug("watch method is not supported");
+        LoggerD("watch method is not supported");
         event->setId(-1);
         return;
     }
 
     event->setSysteminfoPtr(this);
+    event->setTapiHandle((void*)m_tapiHandle);
     m_EventMgrPtr->addEvent(event, event->getWatchType());
 
     EventRequestReceiver<EventWatchSysteminfo>::PostRequest(event);
@@ -460,7 +351,7 @@ void Systeminfo::watch(const EventWatchSysteminfoPtr& event)
 void Systeminfo::clearWatch(const long id)
 {
     if (id < 1) {
-        Throw(InvalidArgumentException);
+        Throw(WrtDeviceApis::Commons::InvalidArgumentException);
     } else {
         int watchType = m_EventMgrPtr->getWatchType(id);
         switch(watchType) {
@@ -492,6 +383,10 @@ void Systeminfo::clearWatch(const long id)
                 break;
             case WATCH_TYPE_CELLULARNETWORK:
                 if ((m_EventMgrPtr->getEventCellularNetworkList()).size() == 1) {
+                    vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, CellularNetworkValueCallback);
+                    vconf_ignore_key_changed(VCONFKEY_TELEPHONY_CELLID, CellularNetworkValueCallback);
+                    vconf_ignore_key_changed(VCONFKEY_TELEPHONY_LAC, CellularNetworkValueCallback);
+                    vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVC_ROAM, CellularNetworkValueCallback);
                     if (m_networkRegist == REGIST_CELLULAR) {
                         connection_unset_ip_address_changed_cb(m_connectionHandle);
                         m_networkRegist = REGIST_NOT;
@@ -520,16 +415,23 @@ void Systeminfo::clearWatch(const long id)
                 break;
             case WATCH_TYPE_DEVICE_ORIENTATION:
                 if ((m_EventMgrPtr->getEventDeviceOrientationList()).size() == 1) {
+                    vconf_ignore_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, OrientationValueVconfCallback);
                     int state = sf_unregister_event(m_sensorHandle, ACCELEROMETER_EVENT_ROTATION_CHECK);
                     if (state < 0) {
-                        LogDebug("sf_unregister_event fail to gather data\n");
+                        LoggerD("sf_unregister_event fail to gather data\n");
                     }
                 }
                 break;
             case WATCH_TYPE_LOCALE:
                 if ((m_EventMgrPtr->getEventLocaleList()).size() == 1) {
-                    runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_LANGUAGE);
-                    runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_REGION);
+                    if (runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_LANGUAGE) != RUNTIME_INFO_ERROR_NONE) {
+                        LoggerE("regist failed");
+                        Throw(WrtDeviceApis::Commons::Exception);
+                    }
+                    if (runtime_info_unset_changed_cb(RUNTIME_INFO_KEY_REGION) != RUNTIME_INFO_ERROR_NONE) {
+                        LoggerE("regist failed");
+                        Throw(WrtDeviceApis::Commons::Exception);
+                    }
                 }
                 break;
             case WATCH_TYPE_PERIPHERAL:
@@ -539,7 +441,7 @@ void Systeminfo::clearWatch(const long id)
                 }
                 break;
             case WATCH_TYPE_UNKNOWN:
-                Throw(InvalidArgumentException);
+                Throw(WrtDeviceApis::Commons::InvalidArgumentException);
                 break;
         }
         m_EventMgrPtr->removeEvent(id, watchType);
@@ -552,8 +454,8 @@ BasePropertyPtr Systeminfo::getBasePropertyPtr(JSContextRef context, JSValueRef
     std::string l_property = converter.toString(property);
     mapProperties::iterator it = (*m_Property).find(l_property);
     if (it == (*m_Property).end()) {
-        LogError("not existing property");
-        Throw(InvalidArgumentException);
+        LoggerE("not existing property");
+        Throw(WrtDeviceApis::Commons::ConversionException);
         return BasePropertyPtr(NULL);
     }
 
@@ -562,6 +464,8 @@ BasePropertyPtr Systeminfo::getBasePropertyPtr(JSContextRef context, JSValueRef
 
 void Systeminfo::getWatchValue(const int watchType)
 {
+    LoggerD(" watch type : " << watchType);
+
     if (watchType == WATCH_TYPE_BATTERY) {
         EventBatteryList eventList = m_EventMgrPtr->getEventBatteryList();
         for (EventBatteryList::iterator it = eventList.begin(); it != eventList.end(); it++) {
@@ -600,18 +504,12 @@ void Systeminfo::getWatchValue(const int watchType)
         for (EventStorageList::iterator it = eventList.begin(); it != eventList.end(); it++) {
         int storageCnt = 1;
         int sdcardState = 0;
-        int usbhostState = 0;
         if(vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &sdcardState) == 0) {
             if(sdcardState == VCONFKEY_SYSMAN_MMC_MOUNTED) {
                 storageCnt++;
             }
         }
-        if(vconf_get_int(VCONFKEY_SYSMAN_USB_HOST_STATUS, &usbhostState) == 0) {
-            if(usbhostState == VCONFKEY_SYSMAN_USB_HOST_CONNECTED) {
-                storageCnt++;
-            }
-        }
-        LogDebug("storage cnt : " << storageCnt);
+        LoggerD("storage cnt : " << storageCnt);
             (*it)->getWatchValue(storageCnt);
         }
     }else if (watchType == WATCH_TYPE_DEVICE_ORIENTATION) {
@@ -629,6 +527,13 @@ void Systeminfo::getWatchValue(const int watchType)
         for (EventPeripheralList::iterator it = eventList.begin(); it != eventList.end(); it++) {
             (*it)->getWatchValue();
         }
+    } else if (watchType == WATCH_TYPE_CELLULARNETWORK) {
+        EventWifiNetworkList eventListCellular = m_EventMgrPtr->getEventCellularNetworkList();
+        if (eventListCellular.size() > 0) {
+            for (EventCellularNetworkList::iterator it = eventListCellular.begin(); it != eventListCellular.end(); it++) {
+                (*it)->getWatchValue();
+            }
+        }
     }
 }
 
@@ -639,12 +544,12 @@ connection_h Systeminfo::getConnectionHandle()
 
 JSValueRef Systeminfo::getCpuValue(JSContextRef context)
 {
-    LogDebug("enter");
+    LoggerD("enter");
     Converter converter(context);
 
     CpuPropertiesPtr cpuPtr(new CpuProperties());
     FILE *fp = NULL;
-    unsigned long long usr = 0, nice = 0, system = 0, idle = 0, cpuUsage = 0, diffIdle = 0, total = 0;
+    long long usr = 0, nice = 0, system = 0, idle = 0, cpuUsage = 0, diffIdle = 0, total = 0;
 
     fp = fopen("/proc/stat", "r");
     if(fp == NULL) {
@@ -654,14 +559,14 @@ JSValueRef Systeminfo::getCpuValue(JSContextRef context)
     if (fscanf(fp, "%*s %lld %lld %lld %lld", &usr, &system, &nice, &idle) > 0) {
         total = usr + nice + system + idle - m_cpuInfo.usr - m_cpuInfo.nice - m_cpuInfo.system - m_cpuInfo.idle;
         diffIdle = idle-m_cpuInfo.idle;
-        if ((total > 0) && (diffIdle > 0)) {
-            cpuUsage = diffIdle * 100 / total;
+        if ((total > 0LL) && (diffIdle > 0LL)) {
+            cpuUsage = diffIdle * 100LL / total;
         cpuPtr->load = (double)cpuUsage / 100.0;
         m_cpuInfo.usr = usr;
         m_cpuInfo.system = system;
         m_cpuInfo.nice = nice;
         m_cpuInfo.idle = idle;        
-            LogDebug("cpu load : " << cpuPtr->load);
+            LoggerD("cpu load : " << cpuPtr->load);
         }
     }
 
@@ -669,10 +574,93 @@ JSValueRef Systeminfo::getCpuValue(JSContextRef context)
     return JSCpuInfo::createJSObject(context, cpuPtr);
 }
 
+void Systeminfo::setSimValue(const int simAttribute, char* value, const EventGetSysteminfoPtr &event)
+{
+    int ret = 0;
+    if (!value) {
+        ret = event->addSimValueCnt();
+    } else {
+        ret = event->setSimValue(simAttribute, value);
+    }
+
+    if (ret == SIM_VALUE_MAX) {
+        event->makeSimObject();
+        EventRequestReceiver<EventGetSysteminfo>::ManualAnswer(event);
+    }
+}
+
 void Systeminfo::OnRequestReceived(const EventGetSysteminfoPtr& event)
 {
-    LogDebug("enter");
-    event->processGetValue((void *)m_connectionHandle);
+    LoggerD("enter");
+
+    if (strcmp(event->getProperty(), (const char*)"SIM") == 0) {
+        int cardChanged = 0;
+        TelSimCardStatus_t simCardState;
+        TelSimImsiInfo_t imsi;
+        char* simState = NULL;
+
+        event->switchToManualAnswer();
+        event->setCancelAllowed(true);        
+        
+        if (tel_get_sim_init_info(m_tapiHandle, &simCardState, &cardChanged) == TAPI_API_SUCCESS) {
+            switch(simCardState) {
+                case TAPI_SIM_STATUS_CARD_NOT_PRESENT :
+                case TAPI_SIM_STATUS_CARD_REMOVED : 
+                    simState = strdup("ABSENT");
+                    break;
+                case TAPI_SIM_STATUS_SIM_INITIALIZING :
+                    simState = strdup("INITIALIZING");
+                    break;
+                case TAPI_SIM_STATUS_SIM_INIT_COMPLETED :
+                    simState = strdup("READY");
+                    break;
+                case TAPI_SIM_STATUS_SIM_PIN_REQUIRED :
+                    simState = strdup("PIN_REQUIRED");
+                    break;
+                case TAPI_SIM_STATUS_SIM_PUK_REQUIRED :
+                    simState = strdup("PUK_REQUIRED");
+                    break;
+                case TAPI_SIM_STATUS_SIM_LOCK_REQUIRED :
+                case TAPI_SIM_STATUS_CARD_BLOCKED :
+                    simState = strdup("SIM_LOCKED");
+                    break;
+                case TAPI_SIM_STATUS_SIM_NCK_REQUIRED :
+                case TAPI_SIM_STATUS_SIM_NSCK_REQUIRED :
+                    simState = strdup("NETWORK_LOCKED");
+                    break;
+                default:
+                    simState = strdup("UNKNOWN");
+                    break;
+            }
+            LoggerD("simState : " << simState);
+            event->setSimState(simState);
+            if (simState)
+                free(simState);
+            if(strcmp(simState, "READY") == 0) {
+                if (tel_get_sim_imsi(m_tapiHandle, &imsi) == TAPI_API_SUCCESS) {
+                    LoggerD("mcc : " << imsi.szMcc << \r" mnc : " << imsi.szMnc << " msin : " << imsi.szMsin);
+                    event->setSimImsi(imsi.szMcc, imsi.szMnc, imsi.szMsin);
+                } else {
+                    LoggerE("get fail sim imsi");
+                }
+                SysteminfoAsyncPendingEvent *cphsPendingEvent = new SysteminfoAsyncPendingEvent((void *)this, event);
+                tel_get_sim_cphs_netname(m_tapiHandle, SimCphsValueCallback, cphsPendingEvent);
+                SysteminfoAsyncPendingEvent *msisdnPendingEvent = new SysteminfoAsyncPendingEvent((void *)this, event);
+                tel_get_sim_msisdn(m_tapiHandle, SimMsisdnValueCallback, msisdnPendingEvent);
+                SysteminfoAsyncPendingEvent *iccidPendingEvent = new SysteminfoAsyncPendingEvent((void *)this, event);
+                tel_get_sim_iccid(m_tapiHandle, SimIccidValueCallback, iccidPendingEvent);
+                SysteminfoAsyncPendingEvent *spnPendingEvent = new SysteminfoAsyncPendingEvent((void *)this, event);
+                tel_get_sim_spn(m_tapiHandle, SimSpnValueCallback, spnPendingEvent);
+            } else {
+                event->makeSimObject();
+                EventRequestReceiver<EventGetSysteminfo>::ManualAnswer(event);
+            }
+        } else {
+            LoggerE("get fail sim state");
+        }
+    } else {
+        event->processGetValue((void *)m_connectionHandle);
+    }
 }
 
 void Systeminfo::OnRequestReceived(const EventWatchSysteminfoPtr& event)
@@ -711,6 +699,10 @@ void Systeminfo::OnRequestReceived(const EventWatchSysteminfoPtr& event)
             break;
         case WATCH_TYPE_CELLULARNETWORK:
             if ((m_EventMgrPtr->getEventCellularNetworkList()).size() == 1) {
+                vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, CellularNetworkValueCallback, (void *)this);
+                vconf_notify_key_changed(VCONFKEY_TELEPHONY_CELLID, CellularNetworkValueCallback, (void *)this);
+                vconf_notify_key_changed(VCONFKEY_TELEPHONY_LAC, CellularNetworkValueCallback, (void *)this);
+                vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVC_ROAM, CellularNetworkValueCallback, (void *)this);                
                 if (m_networkRegist == REGIST_NOT) {
                     connection_set_ip_address_changed_cb(m_connectionHandle, NetworkValueCallback, (void *)this);
                     m_networkRegist = REGIST_CELLULAR;
@@ -736,22 +728,29 @@ void Systeminfo::OnRequestReceived(const EventWatchSysteminfoPtr& event)
             }
             break;
         case WATCH_TYPE_DEVICE_ORIENTATION:
-            LogDebug("regist sensor");
+            LoggerD("regist sensor");
             if ((m_EventMgrPtr->getEventDeviceOrientationList()).size() == 1) {
+                vconf_notify_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, OrientationValueVconfCallback, (void *)this);
                 int state = sf_register_event(m_sensorHandle, ACCELEROMETER_EVENT_ROTATION_CHECK, NULL, OrientationValueCallback, (void *)this);
                 if (state < 0) {
-                    LogDebug("sensor_register_cb fail to gather data");
+                    LoggerD("sensor_register_cb fail to gather data");
                 } else if (state == 0) {
-                    LogDebug("sensor_register_cb success to gather data");
+                    LoggerD("sensor_register_cb success to gather data");
                 }
             } else {
-                LogDebug("already regist");
+                LoggerD("already regist");
             }
             break;
         case WATCH_TYPE_LOCALE:
             if ((m_EventMgrPtr->getEventLocaleList()).size() == 1) {
-                runtime_info_set_changed_cb(RUNTIME_INFO_KEY_REGION, localeChangedCallback, (void *)this);
-                runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LANGUAGE, localeChangedCallback, (void *)this);
+                if (runtime_info_set_changed_cb(RUNTIME_INFO_KEY_REGION, localeChangedCallback, (void *)this) != RUNTIME_INFO_ERROR_NONE) {
+                    LoggerE("regist failed");
+                    Throw(WrtDeviceApis::Commons::Exception);
+                }
+                if (runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LANGUAGE, localeChangedCallback, (void *)this) != RUNTIME_INFO_ERROR_NONE) {
+                    LoggerE("regist failed");
+                    Throw(WrtDeviceApis::Commons::Exception);
+                }
             }
             break;
         case WATCH_TYPE_PERIPHERAL:
@@ -781,61 +780,61 @@ void Systeminfo::EventMgr::clearAllEvent()
 
     while (!m_eventBatteryList.empty()) {
         EventWatchSysteminfoPtr event = m_eventBatteryList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventBatteryList.pop_front();
     }
     while (!m_eventDisplayList.empty()) {
         EventWatchSysteminfoPtr event = m_eventDisplayList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventDisplayList.pop_front();
     }
     while (!m_eventWifiNetworkList.empty()) {
         EventWatchSysteminfoPtr event = m_eventWifiNetworkList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventWifiNetworkList.pop_front();
     }
     while (!m_eventCelluarNetworkList.empty()) {
         EventWatchSysteminfoPtr event = m_eventCelluarNetworkList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventCelluarNetworkList.pop_front();
     }
     while (!m_eventStorageList.empty()) {
         EventWatchSysteminfoPtr event = m_eventStorageList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventStorageList.pop_front();
     }
     while (!m_eventCpuList.empty()) {
         EventWatchSysteminfoPtr event = m_eventCpuList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventCpuList.pop_front();
     }
     while (!m_eventSimList.empty()) {
         EventWatchSysteminfoPtr event = m_eventSimList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventSimList.pop_front();
     }
     while (!m_eventDeviceOrientationList.empty()) {
         EventWatchSysteminfoPtr event = m_eventDeviceOrientationList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventDeviceOrientationList.pop_front();
     }
     while (!m_eventLocaleList.empty()) {
         EventWatchSysteminfoPtr event = m_eventLocaleList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventLocaleList.pop_front();
     }
     while (!m_eventPeripheralList.empty()) {
         EventWatchSysteminfoPtr event = m_eventPeripheralList.front();
-        LogDebug("removing EventId=" << event->getId());
+        LoggerD("removing EventId=" << event->getId());
         event->clearWatch();
         m_eventPeripheralList.pop_front();
     }
@@ -847,48 +846,48 @@ void Systeminfo::EventMgr::addEvent(const EventWatchSysteminfoPtr& arg, const in
 
     if (watchType == WATCH_TYPE_BATTERY){
         m_eventBatteryList.push_back(arg);
-        LogDebug("Event Battery list size=" << m_eventBatteryList.size());
+        LoggerD("Event Battery list size=" << m_eventBatteryList.size());
     } else if (watchType == WATCH_TYPE_DISPLAY) {
         m_eventDisplayList.push_back(arg);
-        LogDebug("Event display list size=" << m_eventDisplayList.size());
+        LoggerD("Event display list size=" << m_eventDisplayList.size());
     } else if (watchType == WATCH_TYPE_WIFINETWORK) {
         m_eventWifiNetworkList.push_back(arg);
-        LogDebug("Event wifi network list size=" << m_eventWifiNetworkList.size());
+        LoggerD("Event wifi network list size=" << m_eventWifiNetworkList.size());
     } else if (watchType == WATCH_TYPE_CELLULARNETWORK) {
         m_eventCelluarNetworkList.push_back(arg);
-        LogDebug("Event cellular network list size=" << m_eventCelluarNetworkList.size());
+        LoggerD("Event cellular network list size=" << m_eventCelluarNetworkList.size());
     } else if (watchType == WATCH_TYPE_STORAGE) {
         m_eventStorageList.push_back(arg);
-        LogDebug("Event storage list size=" << m_eventStorageList.size());
+        LoggerD("Event storage list size=" << m_eventStorageList.size());
     } else if (watchType == WATCH_TYPE_CPU) {
         m_eventCpuList.push_back(arg);
-        LogDebug("Event cpu list size=" << m_eventCpuList.size());
+        LoggerD("Event cpu list size=" << m_eventCpuList.size());
     } else if (watchType == WATCH_TYPE_SIM) {
         m_eventSimList.push_back(arg);
-        LogDebug("Event sim list size=" << m_eventSimList.size());
+        LoggerD("Event sim list size=" << m_eventSimList.size());
     } else if (watchType == WATCH_TYPE_DEVICE_ORIENTATION) {
         m_eventDeviceOrientationList.push_back(arg);
-        LogDebug("Event device orientation list size=" << m_eventDeviceOrientationList.size());
+        LoggerD("Event device orientation list size=" << m_eventDeviceOrientationList.size());
     } else if (watchType == WATCH_TYPE_NETWORK) {
         m_eventNetworkList.push_back(arg);
-        LogDebug("Event network list size=" << m_eventNetworkList.size());
+        LoggerD("Event network list size=" << m_eventNetworkList.size());
     } else if (watchType == WATCH_TYPE_LOCALE) {
         m_eventLocaleList.push_back(arg);
-        LogDebug("Event Locale list size=" << m_eventLocaleList.size());
+        LoggerD("Event Locale list size=" << m_eventLocaleList.size());
     } else if (watchType == WATCH_TYPE_PERIPHERAL) {
         m_eventPeripheralList.push_back(arg);
-        LogDebug("Event peripheral list size=" << m_eventPeripheralList.size());
+        LoggerD("Event peripheral list size=" << m_eventPeripheralList.size());
     }
 }
 
 void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
 {
     DPL::Mutex::ScopedLock lock(&m_synchro);
-    LogDebug("Event id : " << id);
+    LoggerD("Event id : " << id);
 
     EventWatchSysteminfoPtr event(NULL);
 
-    LogDebug("trying to delete event, id=" << id);
+    LoggerD("trying to delete event, id=" << id);
 
     if (watchType == WATCH_TYPE_BATTERY) {
         for (EventBatteryList::iterator it = m_eventBatteryList.begin(); it != m_eventBatteryList.end(); it++) {
@@ -898,13 +897,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event Battery list size=" << m_eventBatteryList.size());
+        LoggerD("event Battery list size=" << m_eventBatteryList.size());
         m_eventBatteryList.remove(event);
-        LogDebug( "event removed, event Battery list size=" << m_eventBatteryList.size());
+        LoggerD( "event removed, event Battery list size=" << m_eventBatteryList.size());
     } else if (watchType == WATCH_TYPE_DISPLAY) {
         for (EventDisplayList::iterator it = m_eventDisplayList.begin(); it != m_eventDisplayList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -913,13 +912,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event display list size=" << m_eventDisplayList.size());
+        LoggerD("event display list size=" << m_eventDisplayList.size());
         m_eventDisplayList.remove(event);
-        LogDebug( "event removed, event display list size=" << m_eventDisplayList.size());
+        LoggerD( "event removed, event display list size=" << m_eventDisplayList.size());
     } else if (watchType == WATCH_TYPE_WIFINETWORK) {
         for (EventWifiNetworkList::iterator it = m_eventWifiNetworkList.begin(); it != m_eventWifiNetworkList.end(); it++) {
         if (id == (*it)->getId()) {
@@ -928,13 +927,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
         }
     }
     if (!event) {
-        LogError("event id not in the list, nothing to do");
+        LoggerE("event id not in the list, nothing to do");
         return;
     }
 
-        LogDebug("event wifi network list size=" << m_eventWifiNetworkList.size());
+        LoggerD("event wifi network list size=" << m_eventWifiNetworkList.size());
         m_eventWifiNetworkList.remove(event);
-        LogDebug( "event removed, event wifi network list size=" << m_eventCelluarNetworkList.size());
+        LoggerD( "event removed, event wifi network list size=" << m_eventCelluarNetworkList.size());
     } else if (watchType == WATCH_TYPE_CELLULARNETWORK) {
         for (EventCellularNetworkList::iterator it = m_eventCelluarNetworkList.begin(); it != m_eventCelluarNetworkList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -943,13 +942,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event cellular network list size=" << m_eventCelluarNetworkList.size());
+        LoggerD("event cellular network list size=" << m_eventCelluarNetworkList.size());
         m_eventCelluarNetworkList.remove(event);
-        LogDebug( "event removed, event cellular network list size=" << m_eventCelluarNetworkList.size());
+        LoggerD( "event removed, event cellular network list size=" << m_eventCelluarNetworkList.size());
     } else if (watchType == WATCH_TYPE_STORAGE) {
         for (EventStorageList::iterator it = m_eventStorageList.begin(); it != m_eventStorageList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -958,13 +957,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event storage list size=" << m_eventStorageList.size());
+        LoggerD("event storage list size=" << m_eventStorageList.size());
         m_eventStorageList.remove(event);
-        LogDebug( "event removed, event storage list size=" << m_eventStorageList.size());
+        LoggerD( "event removed, event storage list size=" << m_eventStorageList.size());
     } else if (watchType == WATCH_TYPE_CPU) {
         for (EventCpuList::iterator it = m_eventCpuList.begin(); it != m_eventCpuList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -973,13 +972,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event cpu list size=" << m_eventCpuList.size());
+        LoggerD("event cpu list size=" << m_eventCpuList.size());
         m_eventCpuList.remove(event);
-        LogDebug( "event removed, event cpu list size=" << m_eventCpuList.size());
+        LoggerD( "event removed, event cpu list size=" << m_eventCpuList.size());
     } else if (watchType == WATCH_TYPE_SIM) {
         for (EventSimList::iterator it = m_eventSimList.begin(); it != m_eventSimList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -988,13 +987,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event sim list size=" << m_eventSimList.size());
+        LoggerD("event sim list size=" << m_eventSimList.size());
         m_eventSimList.remove(event);
-        LogDebug( "event removed, event sim list size=" << m_eventSimList.size());
+        LoggerD( "event removed, event sim list size=" << m_eventSimList.size());
     } else if (watchType == WATCH_TYPE_DEVICE_ORIENTATION) {
         for (EventDeviceOrientationList::iterator it = m_eventDeviceOrientationList.begin(); it != m_eventDeviceOrientationList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -1003,13 +1002,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event device orientation list size=" << m_eventDeviceOrientationList.size());
+        LoggerD("event device orientation list size=" << m_eventDeviceOrientationList.size());
         m_eventDeviceOrientationList.remove(event);
-        LogDebug( "event removed, event device orientation list size=" << m_eventDeviceOrientationList.size());
+        LoggerD( "event removed, event device orientation list size=" << m_eventDeviceOrientationList.size());
     } else if (watchType == WATCH_TYPE_NETWORK) {
         for (EventNetworkList::iterator it = m_eventNetworkList.begin(); it != m_eventNetworkList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -1018,13 +1017,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event network list size=" << m_eventNetworkList.size());
+        LoggerD("event network list size=" << m_eventNetworkList.size());
         m_eventNetworkList.remove(event);
-        LogDebug( "event removed, event network list size=" << m_eventNetworkList.size());
+        LoggerD( "event removed, event network list size=" << m_eventNetworkList.size());
     } else if (watchType == WATCH_TYPE_LOCALE) {
         for (EventLocaleList::iterator it = m_eventLocaleList.begin(); it != m_eventLocaleList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -1033,13 +1032,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event Locale list size=" << m_eventLocaleList.size());
+        LoggerD("event Locale list size=" << m_eventLocaleList.size());
         m_eventLocaleList.remove(event);
-        LogDebug( "event removed, event Locale list size=" << m_eventLocaleList.size());
+        LoggerD( "event removed, event Locale list size=" << m_eventLocaleList.size());
     } else if (watchType == WATCH_TYPE_PERIPHERAL) {
         for (EventPeripheralList::iterator it = m_eventPeripheralList.begin(); it != m_eventPeripheralList.end(); it++) {
             if (id == (*it)->getId()) {
@@ -1048,13 +1047,13 @@ void Systeminfo::EventMgr::removeEvent(WatchId id, const int watchType)
             }
         }
         if (!event) {
-            LogError("event id not in the list, nothing to do");
+            LoggerE("event id not in the list, nothing to do");
             return;
         }
 
-        LogDebug("event peripheral list size=" << m_eventPeripheralList.size());
+        LoggerD("event peripheral list size=" << m_eventPeripheralList.size());
         m_eventPeripheralList.remove(event);
-        LogDebug( "event removed, event peripheral list size=" << m_eventPeripheralList.size());
+        LoggerD( "event removed, event peripheral list size=" << m_eventPeripheralList.size());
     }
 }
 
@@ -1149,7 +1148,7 @@ const int Systeminfo::EventMgr::getWatchType(const long id)
     }
 
     if (!event) {
-        LogError("event id not in the list, nothing to do");
+        LoggerE("event id not in the list, nothing to do");
         return WATCH_TYPE_UNKNOWN;
     }
 
@@ -1238,7 +1237,7 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Cpu) {
 
     CpuPropertiesPtr cpuPtr(new CpuProperties());
     FILE *fp = NULL;
-    unsigned long long usr = 0, nice = 0, system = 0, idle = 0, total = 0, cpuUsage = 0;
+    long long usr = 0, nice = 0, system = 0, idle = 0, total = 0, cpuUsage = 0;
 
     fp = fopen("/proc/stat", "r");
     if(fp == NULL) {
@@ -1247,10 +1246,10 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Cpu) {
     
     if (fscanf(fp, "%*s %lld %lld %lld %lld", &usr, &system, &nice, &idle) > 0) {
         total = usr + nice + system + idle;
-        if ((total > 0) && (idle > 0)) {
-            cpuUsage = idle * 100 / total;
+        if ((total > 0LL) && (idle > 0LL)) {
+            cpuUsage = idle * 100LL / total;
         cpuPtr->load = (double)cpuUsage / 100.0;
-            LogDebug("cpu load : " << cpuPtr->load);
+            LoggerD("cpu load : " << cpuPtr->load);
         }
     }
 
@@ -1261,100 +1260,80 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Cpu) {
 PROPERTY_GET_SYSTEMINFO_DEFINITION(Storage) {
     Converter converter(context);
     int sdcardState=0;
-    int usbhostState=0;
-    int storageCnt=0;
     struct statfs fs;
-    StoragePropertiesPtr internal(new StorageProperties());
-    StoragePropertiesPtr mmc(new StorageProperties());
-    StoragePropertiesPtr usbhost(new StorageProperties());
-    std::vector <JSObjectRef> storagelist;
     
     if (statfs(STORAGE_INTERNAL_PATH, &fs) < 0) {
         return JSValueMakeNull(context);
     }
-
-    internal->type = "INTERNAL";
-    internal->capacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_blocks;
-    internal->availableCapacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_bavail;
-    internal->isRemoveable = false;
-    internal->isRemovable = false;
-    storagelist.push_back(JSStorageInfo::createJSObject(context, internal));
-    storageCnt++;
-
-    if(vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &sdcardState) == 0){
+    StoragePropertiesPtr storagePtr(new StorageProperties());
+    storagePtr->units[0].type = "INTERNAL";
+    storagePtr->units[0].capacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_blocks;
+    storagePtr->units[0].availableCapacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_bavail;
+    storagePtr->units[0].isRemoveable = false;
+    storagePtr->units[0].isRemovable = false;
+    storagePtr->cnt = 1;
+    LoggerD("type : " << storagePtr->units[0].type);
+    if(vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &sdcardState) == 0) {
         if(sdcardState == VCONFKEY_SYSMAN_MMC_MOUNTED){
-            storageCnt++;
             if (statfs(STORAGE_SDCARD_PATH, &fs) < 0) {
                 return JSValueMakeNull(context);
             }
-            mmc->type = "MMC";
-            mmc->capacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_blocks;
-            mmc->availableCapacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_bavail;
-            mmc->isRemoveable = true;
-            mmc->isRemovable = true;
-            storagelist.push_back(JSStorageInfo::createJSObject(context, mmc));
-        }
-    }
-
-    if(vconf_get_int(VCONFKEY_SYSMAN_USB_HOST_STATUS, &usbhostState) == 0) {
-        if(usbhostState == VCONFKEY_SYSMAN_USB_HOST_CONNECTED) {
-            storageCnt++;
-            if (statfs(STORAGE_USBHOST_PATH, &fs) < 0)    {
-                return JSValueMakeNull(context);
-            }
-            usbhost->type = "USB_HOST";
-            usbhost->capacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_blocks;
-            usbhost->availableCapacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_bavail;
-            usbhost->isRemoveable = true;
-            usbhost->isRemovable = true;
-            storagelist.push_back(JSStorageInfo::createJSObject(context, usbhost));
+            storagePtr->units[1].type = "MMC";
+            storagePtr->units[1].capacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_blocks;
+            storagePtr->units[1].availableCapacity = (unsigned long long)fs.f_bsize * (unsigned long long)fs.f_bavail;
+            storagePtr->units[1].isRemoveable = false;
+            storagePtr->units[1].isRemovable = false;
+            storagePtr->cnt = 2;
+            LoggerD("type : " << storagePtr->units[1].type);            
         }
     }
+    return JSStorageInfo::createJSObject(context, storagePtr);  
 
-    return JSObjectMakeArray(context, storageCnt, storagelist.data(), NULL);
 }
 
 PROPERTY_GET_SYSTEMINFO_DEFINITION(Display) {
     Converter converter(context);
 
     DisplayPropertiesPtr display(new DisplayProperties());
-    int brightness=0, dotsPerInchX=0, dotsPerInchY=0, physicalW=0, physicalH=0, resolutionW=0, resolutionH=0;
+    int brightness=0, dotsPerInch=0, physicalW=0, physicalH=0;
+    bool screenSizeSmall = false, screenSizeBig = false;
 
     if(vconf_get_int(VCONFKEY_SETAPPL_LCD_BRIGHTNESS, &brightness) == 0) {
         display->brightness = (double)(brightness)/DISPLAY_BRIGHTNESS_DIVIDE_VALUE;
-        LogDebug("brightness : " << display->brightness);
     }
 
-    if (system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_WIDTH, &resolutionW) == SYSTEM_INFO_ERROR_NONE) {
-        display->resolutionWidth = resolutionW;
-        LogDebug("resolutionWidth : " << display->resolutionWidth);
-    }
-    if (system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_HEIGHT, &resolutionH) == SYSTEM_INFO_ERROR_NONE) {
-        display->resolutionHeight = resolutionH;
-        LogDebug("resolutionHeight : " << display->resolutionHeight);
+    if(system_info_get_platform_bool("tizen.org/feature/screen.size.normal.480.800", &screenSizeSmall) == SYSTEM_INFO_ERROR_NONE) {
+        if (screenSizeSmall) {
+            display->resolutionWidth = 480;
+            display->resolutionHeight = 800;
+        } else {
+            if (system_info_get_platform_bool("tizen.org/feature/screen.size.normal.720.1280", &screenSizeBig) == SYSTEM_INFO_ERROR_NONE) {
+                if (screenSizeBig) {
+                    display->resolutionWidth = 720;
+                    display->resolutionHeight = 1280;
+                }
+            }
+        }
     }
-    if (system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_DPI, &dotsPerInchX) == SYSTEM_INFO_ERROR_NONE) {
-        display->dotsPerInchWidth = dotsPerInchX;
-        LogDebug("dotsPerInchWidth : " << display->dotsPerInchWidth);
+
+    if(system_info_get_platform_int("tizen.org/feature/screen.dpi", &dotsPerInch) == SYSTEM_INFO_ERROR_NONE) {
+        display->dotsPerInchWidth = dotsPerInch;
+        display->dotsPerInchHeight = dotsPerInch;        
     }
-    if (system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_DPI, &dotsPerInchY) == SYSTEM_INFO_ERROR_NONE) {
-        display->dotsPerInchHeight = dotsPerInchY;
-        LogDebug("dotsPerInchHeight : " << display->dotsPerInchHeight);
+
+    if(system_info_get_value_int(SYSTEM_INFO_KEY_PHYSICAL_SCREEN_WIDTH, &physicalW) == SYSTEM_INFO_ERROR_NONE) {
+        display->physicalWidth = physicalW;
     }
-    if (system_info_get_value_int(SYSTEM_INFO_KEY_PHYSICAL_SCREEN_HEIGHT, &physicalH) == SYSTEM_INFO_ERROR_NONE) {
+
+    if(system_info_get_value_int(SYSTEM_INFO_KEY_PHYSICAL_SCREEN_HEIGHT, &physicalH) == SYSTEM_INFO_ERROR_NONE) {
         display->physicalHeight = physicalH;
-        LogDebug("physicalHeight : " << display->physicalHeight);
-    }
-    if (system_info_get_value_int(SYSTEM_INFO_KEY_PHYSICAL_SCREEN_WIDTH, &physicalW) == SYSTEM_INFO_ERROR_NONE) {
-        display->physicalWidth = physicalW;
-        LogDebug("physicalWidth : " << display->physicalWidth);
     }
 
     return JSDisplayInfo::createJSObject(context, display);
 }
 
 PROPERTY_GET_SYSTEMINFO_DEFINITION(Network) {
-    LogDebug("enter");
+    LoggerD("enter");
     Converter converter(context);
     NetworkPropertiesPtr Network(new NetworkProperties());
     connection_h connectionHandle = (connection_h)handle;    
@@ -1362,12 +1341,12 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Network) {
     int networkType = 0;
 
     if (connection_get_type(connectionHandle, &connectionType) != CONNECTION_ERROR_NONE) {
-        LogDebug("get connection type is failed");
+        LoggerD("get connection type is failed");
         return JSNetworkInfo::createJSObject(context, Network);
     }
 
     if (connectionType == CONNECTION_TYPE_WIFI) {
-        LogDebug("wifi network");
+        LoggerD("wifi network");
         Network->networkType= "WIFI";
     } else if (connectionType == CONNECTION_TYPE_CELLULAR) {
         if (vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &networkType) == 0) {
@@ -1445,21 +1424,28 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(CellularNetwork) {
     char* ipAddr = NULL;
     char* apn = NULL;
     char* imei = NULL;
-    int plmn = 0, cellid = 0, lac = 0, isRoaming = 0, isFlightMode = 0;
+    int plmn = 0, cellId = 0, lac = 0, isRoaming = 0, isFlightMode = 0;
 
+    TIME_TRACER_ITEM_BEGIN("(cellular)mcc", 0);
     if (vconf_get_int(VCONFKEY_TELEPHONY_PLMN, &plmn) == 0) {
         cellularNetwork->mcc = plmn / 100;
         cellularNetwork->mnc = plmn % 100;
     }
-    
-    if (vconf_get_int(VCONFKEY_TELEPHONY_CELLID, &cellid) == 0) {
-        cellularNetwork->cellId = cellid;
+    TIME_TRACER_ITEM_END("(cellular)mcc", 0);
+
+    TIME_TRACER_ITEM_BEGIN("(cellular)cellId", 0);
+    if (vconf_get_int(VCONFKEY_TELEPHONY_CELLID, &cellId) == 0) {
+        cellularNetwork->cellId = cellId;
     }
-    
+    TIME_TRACER_ITEM_END("(cellular)cellId", 0);
+
+    TIME_TRACER_ITEM_BEGIN("(cellular)lac", 0);
     if (vconf_get_int(VCONFKEY_TELEPHONY_LAC, &lac) == 0) {
         cellularNetwork->lac = lac;
     }
+    TIME_TRACER_ITEM_END("(cellular)lac", 0);
 
+    TIME_TRACER_ITEM_BEGIN("(cellular)isRoaming", 0);
     if (vconf_get_int(VCONFKEY_TELEPHONY_SVC_ROAM, &isRoaming) == 0) {
         if (isRoaming) {
             cellularNetwork->isRoaming = true;
@@ -1467,7 +1453,9 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(CellularNetwork) {
             cellularNetwork->isRoaming = false;
         }
     }
+    TIME_TRACER_ITEM_END("(cellular)isRoaming", 0);
 
+       TIME_TRACER_ITEM_BEGIN("(cellular)isFlightMode", 0);
     if (vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &isFlightMode) == 0) {
         if (isFlightMode) {
             cellularNetwork->isFlightMode = true;
@@ -1475,6 +1463,7 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(CellularNetwork) {
             cellularNetwork->isFlightMode = false;
         }
     }
+       TIME_TRACER_ITEM_END("(cellular)isFlightMode", 0);
 
     if (connection_get_type(connectionHandle, &connectionType) != CONNECTION_ERROR_NONE) {
         return JSCellularNetworkInfo::createJSObject(context, cellularNetwork);
@@ -1483,34 +1472,42 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(CellularNetwork) {
     if (connectionType == CONNECTION_TYPE_CELLULAR) {
         cellularNetwork->status = "ON";
         if (connection_get_current_profile(connectionHandle, &profileHandle) == CONNECTION_ERROR_NONE) {
+                       TIME_TRACER_ITEM_BEGIN("(cellular)apn", 0);
             if (connection_profile_get_cellular_apn(profileHandle, &apn) == CONNECTION_ERROR_NONE) {
                 cellularNetwork->apn = apn;
                 free(apn);
             }
-        
+                       TIME_TRACER_ITEM_END("(cellular)apn", 0);
+
+                       TIME_TRACER_ITEM_BEGIN("(cellular)ipAddress", 0);
             if (connection_profile_get_ip_address(profileHandle, addressFamily, &ipAddr) == CONNECTION_ERROR_NONE) {
                 cellularNetwork->ipAddress = ipAddr;
                 free(ipAddr);
             }
+                       TIME_TRACER_ITEM_END("(cellular)ipAddress", 0);
             connection_profile_destroy(profileHandle);
         }
     } else {
         cellularNetwork->status = "OFF";
         if (connection_get_default_cellular_service_profile(connectionHandle, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET, &profileHandle) == CONNECTION_ERROR_NONE) {
+                       TIME_TRACER_ITEM_BEGIN("(cellular)apn", 0);
             if (connection_profile_get_cellular_apn(profileHandle, &apn) == CONNECTION_ERROR_NONE) {
                 cellularNetwork->apn = apn;
                 free(apn);
             }
+                       TIME_TRACER_ITEM_END("(cellular)apn", 0);
             connection_profile_destroy(profileHandle);
         }
     }
-
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_MOBILE_DEVICE_ID, &imei) == SYSTEM_INFO_ERROR_NONE) {
-        if (imei) {
-            LogDebug("imei : " << imei);
-            cellularNetwork->imei = imei;
-            free(imei);
-        }
+   
+    imei = tel_get_misc_me_imei_sync((TapiHandle*)tapiHandle);
+    
+    if (imei != NULL) {
+        LoggerD("imei : " << imei);
+        cellularNetwork->imei = imei;
+        free(imei);
+    } else {
+        LoggerD("get fail imei");
     }
 
     return JSCellularNetworkInfo::createJSObject(context, cellularNetwork);
@@ -1520,155 +1517,88 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(SIM) {
     Converter converter(context);
     SIMPropertiesPtr SIM(new SIMProperties());
 
-    char* fullName = NULL;
-    char* shortName = NULL;
-    char* msisdn = NULL;
-    char* iccId = NULL;
-    char* mcc = NULL;
-    char* mnc = NULL;
-    char* msin = NULL;
-    char* spn = NULL;
-    int ret = SIM_ERROR_NONE;
-
-    ret = sim_get_cphs_operator_name(&fullName, &shortName);
-    if (ret == SIM_ERROR_NONE) {
-        if (fullName) {
-            SIM->operatorName = fullName;
-            LogDebug("operatorName : " << SIM->operatorName);
-            free(fullName);
-        } else if (shortName) {
-            SIM->operatorName = shortName;
-            LogDebug("operatorName : " << SIM->operatorName);
-            free(shortName);
-        }
-    }
-
-    ret = sim_get_subscriber_number(&msisdn);
-    if (ret == SIM_ERROR_NONE) {
-        if (msisdn) {
-            SIM->msisdn = msisdn;
-            LogDebug("msisdn : " << SIM->msisdn);
-            free(msisdn);
-        }
-    }
-
-    ret = sim_get_icc_id(&iccId);
-    if (ret == SIM_ERROR_NONE) {
-        if (iccId) {
-            SIM->iccid = iccId;
-            LogDebug("iccid : " << SIM->iccid);
-            free(iccId);
-        }
-    }
-
-    ret = sim_get_mcc(&mcc);
-    if (ret == SIM_ERROR_NONE) {
-        if (mcc) {
-            SIM->mcc = atoi(mcc);
-            LogDebug("mcc : " << SIM->mcc);
-            free(mcc);
-        }
-    }
-
-    ret = sim_get_mnc(&mnc);
-    if (ret == SIM_ERROR_NONE) {
-        if (mnc) {
-            SIM->mnc = atoi(mnc);
-            LogDebug("mnc : " << SIM->mnc);
-            free(mnc);
-        }
-    }
-
-    ret = sim_get_msin(&msin);
-    if (ret == SIM_ERROR_NONE) {
-        if (msin) {
-            SIM->msin = msin;
-            LogDebug("msin : " << SIM->msin);
-            free(msin);
-        }
-    }
-
-    ret = sim_get_spn(&spn);
-    if (ret == SIM_ERROR_NONE) {
-        if (spn) {
-            SIM->spn = spn;
-            LogDebug("spn : " << SIM->spn);
-            free(spn);
-        }
-    }
-
     return JSSIMInfo::createJSObject(context, SIM);
 }
 
 PROPERTY_GET_SYSTEMINFO_DEFINITION(DeviceOrientation) {
-    LogDebug("enter");
+    LoggerD("enter");
     Converter converter(context);
     DeviceOrientationPropertiesPtr deviceOrientation(new DeviceOrientationProperties());
 
     unsigned long rotation = 0;
     int handleOrientaion = 0;
+    int isAutoRotation = 0;
+
+    if (vconf_get_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, &isAutoRotation) == 0) {
+        if (isAutoRotation) {
+            deviceOrientation->isAutoRotation = true;
+        } else {
+            deviceOrientation->isAutoRotation = false;
+        }
+    }
 
     handleOrientaion = sf_connect(ACCELEROMETER_SENSOR);
-    LogDebug("handleOrientaion : " << handleOrientaion);
+    LoggerD("handleOrientaion : " << handleOrientaion);
     if (handleOrientaion < 0) {
-        LogDebug ("sensor attach fail");
+        LoggerD ("sensor attach fail");
         return JSDeviceOrientationInfo::createJSObject(context, deviceOrientation);
     }
     int state = sf_start(handleOrientaion, 0);
     if(state < 0) {
-        LogDebug("start failed");
+        LoggerD("start failed");
     }
 
     int ret_val = sf_check_rotation(&rotation);
     if (ret_val < 0) {
-        LogDebug("sf_check_rotation fail to gather data\n");
+        LoggerD("sf_check_rotation fail to gather data\n");
     }
 
-    LogDebug(" rotation value = " << rotation);
+    LoggerD(" rotation value = " << rotation);
 
     switch (rotation) {
         case 0:
         case ROTATION_EVENT_0:
-            LogDebug("my_callback_func received data (PORTRAIT_TOP|HEAD_CENTER)\n");
+            LoggerD("my_callback_func received data (PORTRAIT_TOP|HEAD_CENTER)\n");
             deviceOrientation->status = "PORTRAIT_PRIMARY";
             break;
         case ROTATION_EVENT_90:
-            LogDebug("my_callback_func received data (LANDSCAPE|HEAD_RIGHT)\n");
+            LoggerD("my_callback_func received data (LANDSCAPE|HEAD_RIGHT)\n");
             deviceOrientation->status = "LANDSCAPE_PRIMARY";
             break;
         case ROTATION_EVENT_180:
-            LogDebug("my_callback_func received data (PORTRAIT_BTM|HEAD_CENTER)\n");
+            LoggerD("my_callback_func received data (PORTRAIT_BTM|HEAD_CENTER)\n");
             deviceOrientation->status = "PORTRAIT_SECONDARY";
             break;
         case ROTATION_EVENT_270:
-            LogDebug("my_callback_func received data (LANDSCAPE|HEAD_LEFT)\n");
+            LoggerD("my_callback_func received data (LANDSCAPE|HEAD_LEFT)\n");
             deviceOrientation->status = "LANDSCAPE_SECONDARY";
             break;
         default:
-            LogDebug(" received data unexpected\n");
+            LoggerD(" received data unexpected\n");
             break;
     }
 
        state = sf_stop(handleOrientaion);
-       LogDebug("handleOrientaion 1  state = " << state);
+       LoggerD("handleOrientaion 1  state = " << state);
 
        state = sf_disconnect(handleOrientaion);
-       LogDebug("handleOrientaion  state =" << state);
+       LoggerD("handleOrientaion  state =" << state);
 
     return JSDeviceOrientationInfo::createJSObject(context, deviceOrientation);
 }
 
 PROPERTY_GET_SYSTEMINFO_DEFINITION(Build) {
-    LogDebug("enter");
+    LoggerD("enter");
     Converter converter(context);
     BuildPropertiesPtr Build(new BuildProperties());
 
     char* model = NULL;
     char* manufacturer = NULL;
+    char* buildVersion = NULL;
 
-    if (system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &model) == SYSTEM_INFO_ERROR_NONE) {
+    if(system_info_get_platform_string("tizen.org/system/model_name", &model) == SYSTEM_INFO_ERROR_NONE) {
         if (model != NULL) {
-            LogDebug("model : " << model);
+            LoggerD("model : " << model);
             Build->model = model;
             free(model);
         }
@@ -1676,17 +1606,25 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Build) {
 
     if (system_info_get_value_string(SYSTEM_INFO_KEY_MANUFACTURER, &manufacturer) == SYSTEM_INFO_ERROR_NONE) {
         if (manufacturer != NULL) {
-            LogDebug("manufacturer : " << manufacturer);
+            LoggerD("manufacturer : " << manufacturer);
             Build->manufacturer = manufacturer;
             free(manufacturer);
         }
     }
 
+    if (system_info_get_value_string(SYSTEM_INFO_KEY_BUILD_STRING, &buildVersion) == SYSTEM_INFO_ERROR_NONE) {
+        if (buildVersion != NULL) {
+            LoggerD("buildVersion : " << buildVersion);
+            Build->buildVersion = buildVersion;
+            free(buildVersion);
+        }
+    }
+
     return JSBuildInfo::createJSObject(context, Build);
 }
 
 PROPERTY_GET_SYSTEMINFO_DEFINITION(Locale) {
-    LogDebug("enter");
+    LoggerD("enter");
     Converter converter(context);
     LocalePropertiesPtr Locale(new LocaleProperties());
 
@@ -1695,30 +1633,28 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Locale) {
 
     if (runtime_info_get_value_string(RUNTIME_INFO_KEY_LANGUAGE, &language) == RUNTIME_INFO_ERROR_NONE) {
         if (language != NULL) {
-            LogDebug("language : " << language);
+            LoggerD("language : " << language);
             Locale->language = language;
             free(language);
         }
     }
 
     if (runtime_info_get_value_string(RUNTIME_INFO_KEY_REGION, &country) == RUNTIME_INFO_ERROR_NONE) {
-        LogDebug("country : " << country);
-        char* token = NULL;
-        char* countryTemp = NULL;
-        token = strtok(country, ".");
-        if (token != NULL) {
-        countryTemp = strdup(token);
-            if (countryTemp != NULL) {
-        Locale->country = countryTemp;
-            }
-        if (countryTemp != NULL) {
-            free(countryTemp);
-        }
         if (country != NULL) {
-            free(country);
+            LoggerD("country : " << country);
+            char* token = NULL;
+            char* countryTemp = NULL;
+            token = strtok(country, ".");
+            if (token != NULL) {
+                countryTemp = strdup(token);
+                if (countryTemp != NULL) {
+                    Locale->country = countryTemp;
+                    free(countryTemp);
+                }
+            }            
+            free(country);            
         }
     }
-    }
 
     return JSLocaleInfo::createJSObject(context, Locale);
 }
@@ -1734,7 +1670,7 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Peripheral) {
                 peripheral->isVideoOutputOn = true;
                 break;
             default:
-                LogDebug("VideOutput status is off");
+                LoggerD("VideOutput status is off");
                 break;
         }
     }
@@ -1745,7 +1681,7 @@ PROPERTY_GET_SYSTEMINFO_DEFINITION(Peripheral) {
                 peripheral->isVideoOutputOn = true;
                 break;
             default:
-                LogDebug("VideOutput status is off");
+                LoggerD("VideOutput status is off");
                 break;
         }
     }