From: Taehee Lee Date: Sat, 8 Sep 2012 07:48:29 +0000 (+0900) Subject: Update change log and spec for wrt-plugins-tizen_0.2.81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1783df6de25346b6a6b1e47ec78a467c97391cce;p=profile%2Fivi%2Fwrt-plugins-tizen.git Update change log and spec for wrt-plugins-tizen_0.2.81 Changed Modules : Device, Contact [Version] 0.2.81 [Project] GT-I8800, Public [Title] SEL Verification [Team] WebAPI [BinType] PDA [Customer] Open [Issue#] N/A [Problem] siso open,private target tc index.html file addition. [Cause] N/A [Solution] N/A [Issue#] N/A [Problem] when call getCapabilites API, occur crash [Cause] if we get null value, we can't controll it [Solution] we added exception controll code [Issue#] N_SE-9755, N_SE-9580 [Problem] Error when launching contact app right after booting [Cause] contact svc is not initialized yet [Solution] retry connction for every getAddressBook() [SCMRequest] N/A Change-Id: I938ba4e7fcca80d0d817a14f600d06c9986f35ca --- diff --git a/debian/changelog b/debian/changelog index d5fc811..c192f2c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +wrt-plugins-tizen (0.2.81) unstable; urgency=low + + * Bug fix on Device, Contact + * git : slp/pkgs/w/wrt-plugins-tizen + * Tag : wrt-plugins-tizen_0.2.81 + + -- Siwoo Lee Sat, 08 Sep 2012 16:41:49 +0900 + wrt-plugins-tizen (0.2.80) unstable; urgency=low * Bug fix on Systeminfo diff --git a/packaging/wrt-plugins-tizen.spec b/packaging/wrt-plugins-tizen.spec index ca4b6d3..7e9f159 100755 --- a/packaging/wrt-plugins-tizen.spec +++ b/packaging/wrt-plugins-tizen.spec @@ -1,6 +1,6 @@ Name: wrt-plugins-tizen Summary: JavaScript plugins for WebRuntime -Version: 0.2.80 +Version: 0.2.81 Release: 0 Group: TO_BE_FILLED License: TO_BE_FILLED diff --git a/src/platform/Tizen/Contact/ContactsSvcWrapper.cpp b/src/platform/Tizen/Contact/ContactsSvcWrapper.cpp index f3d64cd..6365656 100755 --- a/src/platform/Tizen/Contact/ContactsSvcWrapper.cpp +++ b/src/platform/Tizen/Contact/ContactsSvcWrapper.cpp @@ -42,22 +42,9 @@ ContactsSvcWrapper::ContactsSvcWrapper() : m_addressBooks(new AddressBookArray()), m_defaultAddressBookIndex(-1) { - //when it is first instance then open connection to database - int ret = contacts_svc_connect(); - if (ret != CTS_SUCCESS) - { - //error during opening contacts database - LogError("Error occurred during opening contacts database. (ret:" << ret << ")"); - m_opened = false; - - return; + if (!m_opened) { + init(); } - - //contacts-service has properly connected. - LogDebug("Contact db has properly opened."); - m_opened = true; - - loadAddressBooks(); } ContactsSvcWrapper::~ContactsSvcWrapper() @@ -74,6 +61,21 @@ ContactsSvcWrapper::~ContactsSvcWrapper() void ContactsSvcWrapper::init() { + int ret = contacts_svc_connect(); + if (ret != CTS_SUCCESS) + { + //error during opening contacts database + LogError("Error occurred during opening contacts database. (ret:" << ret << ")"); + m_opened = false; + + return; + } + + //contacts-service has properly connected. + LogDebug("Contact db has properly opened."); + m_opened = true; + + loadAddressBooks(); } @@ -81,9 +83,13 @@ AddressBookPtr ContactsSvcWrapper::getAddressBook(const std::string &id) { if(!m_opened) { - //when database is not opened then set result as failed - LogError("Contact db is not open."); - ThrowMsg(PlatformException, "Contact DB is not open."); + init(); + + if(!m_opened) { + //when database is not opened then set result as failed + LogError("Contact db is not open."); + ThrowMsg(PlatformException, "Contact DB is not open."); + } } if(m_idMap.find(id) == m_idMap.end()) @@ -97,13 +103,17 @@ AddressBookPtr ContactsSvcWrapper::getAddressBook(const std::string &id) return m_addressBooks->at(index); } -AddressBookPtr ContactsSvcWrapper::getDefaultAddressBook() const +AddressBookPtr ContactsSvcWrapper::getDefaultAddressBook() { if(!m_opened) { - //when database is not opened then set result as failed - LogError("Contact db is not open."); - ThrowMsg(PlatformException, "Contact DB is not open."); + init(); + + if(!m_opened) { + //when database is not opened then set result as failed + LogError("Contact db is not open."); + ThrowMsg(PlatformException, "Contact DB is not open."); + } } if(m_defaultAddressBookIndex == -1 || m_addressBooks->size() == 0) @@ -112,13 +122,17 @@ AddressBookPtr ContactsSvcWrapper::getDefaultAddressBook() const return m_addressBooks->at(m_defaultAddressBookIndex); } -AddressBookArrayPtr ContactsSvcWrapper::getAddressBooks() const +AddressBookArrayPtr ContactsSvcWrapper::getAddressBooks() { if(!m_opened) { - //when database is not opened then set result as failed - LogError("Contact db is not open."); - ThrowMsg(PlatformException, "Contact DB is not open."); + init(); + + if(!m_opened) { + //when database is not opened then set result as failed + LogError("Contact db is not open."); + ThrowMsg(PlatformException, "Contact DB is not open."); + } } AddressBookArrayPtr newArray(new AddressBookArray()); diff --git a/src/platform/Tizen/Contact/ContactsSvcWrapper.h b/src/platform/Tizen/Contact/ContactsSvcWrapper.h index 6942c8c..8a8862a 100755 --- a/src/platform/Tizen/Contact/ContactsSvcWrapper.h +++ b/src/platform/Tizen/Contact/ContactsSvcWrapper.h @@ -43,8 +43,8 @@ public: void init(); TizenApis::Api::Contact::AddressBookPtr getAddressBook(const std::string &id); - TizenApis::Api::Contact::AddressBookPtr getDefaultAddressBook() const; - TizenApis::Api::Contact::AddressBookArrayPtr getAddressBooks() const; + TizenApis::Api::Contact::AddressBookPtr getDefaultAddressBook(); + TizenApis::Api::Contact::AddressBookArrayPtr getAddressBooks(); private: void loadAddressBooks(); diff --git a/src/platform/Tizen/Device/Device.cpp b/src/platform/Tizen/Device/Device.cpp index 2be29c7..66e84bd 100755 --- a/src/platform/Tizen/Device/Device.cpp +++ b/src/platform/Tizen/Device/Device.cpp @@ -73,8 +73,11 @@ DeviceCapabilitiesPropertiesPtr Device::get() } if (system_info_get_value_string(SYSTEM_INFO_KEY_KEYBOARD_TYPE, &inputKeyboard) == SYSTEM_INFO_ERROR_NONE) { - LogDebug("inputKeyboard : " << inputKeyboard); - deviceCapabilities->inputKeyboard = inputKeyboard; + 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) { @@ -88,16 +91,19 @@ DeviceCapabilitiesPropertiesPtr Device::get() } if (system_info_get_value_string(SYSTEM_INFO_KEY_OPENGLES_VERSION, &openglesVersion) == SYSTEM_INFO_ERROR_NONE) { - 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; + 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); } } @@ -107,13 +113,19 @@ DeviceCapabilitiesPropertiesPtr Device::get() } if (system_info_get_value_string(SYSTEM_INFO_KEY_TIZEN_VERSION_NAME, &platformVersion) == SYSTEM_INFO_ERROR_NONE) { - LogDebug("platformVersion : " << platformVersion); - deviceCapabilities->platformVersion = platformVersion; + 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) { - LogDebug("platformName : " << platformName); - deviceCapabilities->platformName = platformName; + 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) { @@ -187,13 +199,19 @@ DeviceCapabilitiesPropertiesPtr Device::get() } if (system_info_get_value_string(SYSTEM_INFO_KEY_CORE_CPU_ARCH, &platformCoreCpuArch) == SYSTEM_INFO_ERROR_NONE) { - LogDebug("platformCoreCpuArch : " << platformCoreCpuArch); - deviceCapabilities->platformCoreCpuArch = platformCoreCpuArch; + 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) { - LogDebug("platformCoreFpuArch : " << platformCoreFpuArch); - deviceCapabilities->platformCoreFpuArch = platformCoreFpuArch; + 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) { @@ -202,8 +220,11 @@ DeviceCapabilitiesPropertiesPtr Device::get() } if (system_info_get_value_string(SYSTEM_INFO_KEY_DEVICE_UUID, &duid) == SYSTEM_INFO_ERROR_NONE) { - LogDebug("duid : " << duid); - deviceCapabilities->duid = duid; + 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) {