From 7d34c8612697f5fd7140d5962e96859ac4405fb7 Mon Sep 17 00:00:00 2001 From: Lukasz Bardeli Date: Tue, 5 Jul 2016 14:47:15 +0200 Subject: [PATCH 01/16] [HAM] add NOT_SUPPORTED_ERR to WIRST_UP Change-Id: I2eb81e5ebb52f8fe9e93efb3c9e240c8c109c789 Signed-off-by: Lukasz Bardeli --- src/humanactivitymonitor/humanactivitymonitor_manager.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/humanactivitymonitor/humanactivitymonitor_manager.cc b/src/humanactivitymonitor/humanactivitymonitor_manager.cc index 003951a..284a686 100755 --- a/src/humanactivitymonitor/humanactivitymonitor_manager.cc +++ b/src/humanactivitymonitor/humanactivitymonitor_manager.cc @@ -294,9 +294,15 @@ class HumanActivityMonitorManager::Monitor::GestureMonitor : public HumanActivit int ret = gesture_is_supported(GESTURE_WRIST_UP, &supported); if (ret != SENSOR_ERROR_NONE) { - return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, - "WRIST_UP gesture check failed", - ("gesture_is_supported(GESTURE_WRIST_UP), error: %d (%s)", ret, get_error_message(ret))); + if (ret == GESTURE_ERROR_NOT_SUPPORTED) { + return LogAndCreateResult(ErrorCode::NOT_SUPPORTED_ERR, + "WRIST_UP gesture check failed", + ("gesture_is_supported(GESTURE_WRIST_UP), error: %d (%s)", ret, get_error_message(ret))); + } else { + return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, + "WRIST_UP gesture check failed", + ("gesture_is_supported(GESTURE_WRIST_UP), error: %d (%s)", ret, get_error_message(ret))); + } } *s = supported; -- 2.7.4 From e1a19f3a3dcb14599132b8f40f6658ed71281c2d Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Wed, 6 Jul 2016 10:52:17 +0900 Subject: [PATCH 02/16] [version] 1.9 Change-Id: Ia2a1329fda383ffded1e7fca551002d146b7526f --- packaging/webapi-plugins.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 1a1624e..2e9adad 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.8 +Version: 1.9 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries -- 2.7.4 From ef2e85733e0ca2eb09b2dd415b888cc555239277 Mon Sep 17 00:00:00 2001 From: Lukasz Bardeli Date: Wed, 6 Jul 2016 12:44:15 +0200 Subject: [PATCH 03/16] [NBS] Add printing error value from native API Change-Id: I3fafebf373b99eb68945d3a215d3c7bfdd6ff0b3 Signed-off-by: Lukasz Bardeli --- src/networkbearerselection/networkbearerselection_manager.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/networkbearerselection/networkbearerselection_manager.cc b/src/networkbearerselection/networkbearerselection_manager.cc index 7a1b81c..c77a37a 100644 --- a/src/networkbearerselection/networkbearerselection_manager.cc +++ b/src/networkbearerselection/networkbearerselection_manager.cc @@ -211,11 +211,13 @@ void NetworkBearerSelectionManager::requestRouteToHost( destroyProfileHandle(); - if (connection_get_default_cellular_service_profile( - m_connection_handle_, - CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET, - &m_profile_handle_) != CONNECTION_ERROR_NONE) { - LoggerE("Fail to get profile handle"); + int ret = connection_get_default_cellular_service_profile( + m_connection_handle_, + CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET, + &m_profile_handle_); + + if (ret != CONNECTION_ERROR_NONE) { + LoggerE("Fail to get profile handle. %d", ret); makeErrorCallback(domain_name, kPlatformError); return; } -- 2.7.4 From 4cb7aa3a45e39da36b893f315a8bcb23e1c4b155 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Wed, 6 Jul 2016 21:23:45 +0900 Subject: [PATCH 04/16] [version] 1.10 Change-Id: Ifca8f412246799facf60de7c52df741d65ac5d0e --- packaging/webapi-plugins.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 2e9adad..1080859 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.9 +Version: 1.10 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries -- 2.7.4 From 51fbc9e1c98647f5a1ae5bd56d9506bda42fde0f Mon Sep 17 00:00:00 2001 From: Piotr Kosko Date: Thu, 7 Jul 2016 09:49:32 +0200 Subject: [PATCH 05/16] [Filesystem][Systeminfo] Changed storage handling [Feature] Deviced is used for handling only removable devices, internal storages are handled with storage api. [Verification] Code compiles without error. TCT for filesystem, systeminfo and archive 100% passrate (Auto and Manual) Change-Id: If5609ff4f22383efd018a445f6a56760983b9818 Signed-off-by: Piotr Kosko --- src/common/filesystem/filesystem_provider.cc | 5 ---- src/common/filesystem/filesystem_provider.h | 2 -- .../filesystem/filesystem_provider_deviced.cc | 14 ++++++----- .../filesystem/filesystem_provider_deviced.h | 1 - .../filesystem/filesystem_provider_storage.cc | 28 ++++----------------- .../filesystem/filesystem_provider_storage.h | 2 -- src/systeminfo/systeminfo_properties_manager.cc | 29 ++++++++-------------- 7 files changed, 23 insertions(+), 58 deletions(-) diff --git a/src/common/filesystem/filesystem_provider.cc b/src/common/filesystem/filesystem_provider.cc index 7cb6c1a..ff6c26e 100644 --- a/src/common/filesystem/filesystem_provider.cc +++ b/src/common/filesystem/filesystem_provider.cc @@ -71,11 +71,6 @@ VirtualStorages FilesystemProvider::GetAllStorages() { return provider_.GetAllStorages(); } -std::shared_ptr< Storage > FilesystemProvider::GetInternalStorage(){ - LoggerD("Entered"); - return provider_.GetInternalStorage(); -} - std::string FilesystemProvider::GetRealPath( const std::string& path_or_uri) { LoggerD("Entered"); diff --git a/src/common/filesystem/filesystem_provider.h b/src/common/filesystem/filesystem_provider.h index 69030d5..1b3dd92 100644 --- a/src/common/filesystem/filesystem_provider.h +++ b/src/common/filesystem/filesystem_provider.h @@ -36,7 +36,6 @@ class IFilesystemProvider { virtual Storages GetStorages() = 0; virtual VirtualRoots GetVirtualPaths() = 0; virtual VirtualStorages GetAllStorages() = 0; - virtual std::shared_ptr GetInternalStorage() = 0; }; typedef IFilesystemProvider& FilesystemProviderRef; @@ -52,7 +51,6 @@ class FilesystemProvider { Storages GetStorages(); VirtualRoots GetVirtualPaths(); VirtualStorages GetAllStorages(); - std::shared_ptr GetInternalStorage(); std::string GetRealPath(const std::string& path_or_uri); std::string GetVirtualPath(const std::string& real_path) const; diff --git a/src/common/filesystem/filesystem_provider_deviced.cc b/src/common/filesystem/filesystem_provider_deviced.cc index cf6a7ad..81bb570 100644 --- a/src/common/filesystem/filesystem_provider_deviced.cc +++ b/src/common/filesystem/filesystem_provider_deviced.cc @@ -195,10 +195,6 @@ void FilesystemProviderDeviced::UnregisterDeviceChangeState() { device_changed_callback_ = nullptr; } -std::shared_ptr FilesystemProviderDeviced::GetInternalStorage() { - return virtual_roots_provider_.GetInternalStorage(); -} - std::shared_ptr FilesystemProviderDeviced::GetStorage(const DeviceListElem& elem) { LoggerD("Entered"); return std::make_shared(GetIdFromUUID(elem.fs_uuid_enc), @@ -230,7 +226,6 @@ int FilesystemProviderDeviced::GetIdFromUUID(const char* const char_uuid) { Storages FilesystemProviderDeviced::GetStorages() { LoggerD("Entered"); - if(!is_initialized_) { LoggerE("DeviceD Core api not initialized"); return Storages(); @@ -253,7 +248,14 @@ Storages FilesystemProviderDeviced::GetStorages() { LoggerE("Failed to call GetDeviceList method - %s", message.c_str()); return Storages(); } - return GetStoragesFromGVariant(variant); + // internal storages are gathered with storage api + Storages internal = virtual_roots_provider_.GetStorages(); + // external storages are gathered using deviced implementation + Storages result = GetStoragesFromGVariant(variant); + + // merging internal and external results together, but internal on the beginning + result.insert(result.begin(), internal.begin(), internal.end()); + return result; } Storages FilesystemProviderDeviced::GetStoragesFromGVariant(GVariant* variant) { diff --git a/src/common/filesystem/filesystem_provider_deviced.h b/src/common/filesystem/filesystem_provider_deviced.h index bae0ea5..388e6c5 100644 --- a/src/common/filesystem/filesystem_provider_deviced.h +++ b/src/common/filesystem/filesystem_provider_deviced.h @@ -44,7 +44,6 @@ class FilesystemProviderDeviced : public IFilesystemProvider { virtual VirtualRoots GetVirtualPaths(); virtual Storages GetStorages(); virtual VirtualStorages GetAllStorages(); - virtual std::shared_ptr< Storage > GetInternalStorage(); static FilesystemProviderDeviced& Create(); private: diff --git a/src/common/filesystem/filesystem_provider_storage.cc b/src/common/filesystem/filesystem_provider_storage.cc index d58d644..a26cc3f 100644 --- a/src/common/filesystem/filesystem_provider_storage.cc +++ b/src/common/filesystem/filesystem_provider_storage.cc @@ -90,22 +90,10 @@ bool OnForeachStorage(int storage_id, storage_type_e type, FilesystemProviderStorage* provider = static_cast(user_data); - int err = storage_set_state_changed_cb(storage_id, OnStorageChange, provider); - if (STORAGE_ERROR_NONE != err) { - LoggerW("Failed to add listener"); - } - - StorageType type_ = - type == STORAGE_TYPE_INTERNAL ? - StorageType::kInternal : StorageType::kMmc; - - provider->AddStorage( - std::make_shared(storage_id, type_, TranslateCoreStorageState(state), path)); - if (type_ == StorageType::kInternal) { - // TODO check internal storage - //provider->internal_storage_ = std::make_shared(Storage(storage_id, type_, state_, path, kVirtualRootMedia)); - // if internal storage is supported, we can add also virtual paths: - // downloads, documents etc + // handling only internal storages (external are handled with deviced api) + if (STORAGE_TYPE_INTERNAL == type) { + provider->AddStorage( + std::make_shared(storage_id, StorageType::kInternal, TranslateCoreStorageState(state), path)); provider->FillVirtualPaths(storage_id); } return true; @@ -119,8 +107,7 @@ DeviceChangeStateFun FilesystemProviderStorage::GetListener() { return listener_; } -FilesystemProviderStorage::FilesystemProviderStorage() : - internal_storage_(nullptr) { +FilesystemProviderStorage::FilesystemProviderStorage() { LoggerD("Entered"); int err = storage_foreach_device_supported(OnForeachStorage, this); if (err != STORAGE_ERROR_NONE) { @@ -209,11 +196,6 @@ std::string FilesystemProviderStorage::GetRealPath( return realpath; } -std::shared_ptr< Storage > FilesystemProviderStorage::GetInternalStorage(){ - LoggerD("Entered"); - return internal_storage_; -} - std::string FilesystemProviderStorage::GetVirtualPath( const std::string& real_path) const { LoggerD("Enter"); diff --git a/src/common/filesystem/filesystem_provider_storage.h b/src/common/filesystem/filesystem_provider_storage.h index 133f801..2198200 100644 --- a/src/common/filesystem/filesystem_provider_storage.h +++ b/src/common/filesystem/filesystem_provider_storage.h @@ -35,7 +35,6 @@ class FilesystemProviderStorage : public IFilesystemProvider { virtual Storages GetStorages(); virtual VirtualRoots GetVirtualPaths(); virtual VirtualStorages GetAllStorages(); - virtual std::shared_ptr< Storage > GetInternalStorage(); std::string GetRealPath(const std::string& path_or_uri); std::string GetVirtualPath(const std::string& real_path) const; @@ -54,7 +53,6 @@ class FilesystemProviderStorage : public IFilesystemProvider { DeviceChangeStateFun listener_; Storages storages_; VirtualRoots virtual_paths_; - std::shared_ptr internal_storage_; }; } // namespace common diff --git a/src/systeminfo/systeminfo_properties_manager.cc b/src/systeminfo/systeminfo_properties_manager.cc index 94b4fa5..33b639d 100644 --- a/src/systeminfo/systeminfo_properties_manager.cc +++ b/src/systeminfo/systeminfo_properties_manager.cc @@ -1167,6 +1167,8 @@ static void CreateStorageInfo(const std::string& type, struct statfs& fs, picojs static std::string FromStorageTypeToStringType(common::StorageType type) { switch(type) { + case common::StorageType::kInternal: + return kTypeInternal; case common::StorageType::kUsbDevice: return kTypeUsbDevice; case common::StorageType::kUsbHost: @@ -1185,18 +1187,7 @@ PlatformResult SysteminfoPropertiesManager::ReportStorage(picojson::object* out) picojson::value result = picojson::value(picojson::array()); picojson::array& array = result.get(); - // handling internal storage - array.push_back(picojson::value(picojson::object())); - picojson::object& internal_obj = array.back().get(); - - if (statfs(kStorageInternalPath.c_str(), &fs) < 0) { - return LogAndCreateResult( - ErrorCode::UNKNOWN_ERR, "There are no storage units detected"); - } - CreateStorageInfo(kTypeInternal, fs, &internal_obj); - manager_.SetAvailableCapacityInternal(fs.f_bavail); - - // handling external storages + // handling storages from provider common::FilesystemProvider& provider(common::FilesystemProvider::Create()); auto storages = provider.GetStorages(); LoggerD("Storages found %d", storages.size()); @@ -1209,13 +1200,13 @@ PlatformResult SysteminfoPropertiesManager::ReportStorage(picojson::object* out) array.push_back(picojson::value(picojson::object())); picojson::object& external_obj = array.back().get(); CreateStorageInfo(FromStorageTypeToStringType(storage->type()), fs, &external_obj); -#ifdef TIZEN_TV - // TODO some tracking of available capacity of usb storages should be applied -#else - // Only one storage would be tracked, if more than one SD card would be supported on device - // different mechanism should be applied - manager_.SetAvailableCapacityMmc(fs.f_bavail); -#endif + + //TODO change implementation to support all types of storages and not limited number + if (common::StorageType::kInternal == storage->type()) { + manager_.SetAvailableCapacityInternal(fs.f_bavail); + } else if (common::StorageType::kMmc == storage->type()) { + manager_.SetAvailableCapacityMmc(fs.f_bavail); + } } } -- 2.7.4 From 53d4b08dc571564da59f0400a0a7acaa738eeefd Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Thu, 7 Jul 2016 17:41:49 +0900 Subject: [PATCH 06/16] [version] 1.11 Change-Id: I28985dc3ae75efa18f9515f046591ecc579aa93a --- packaging/webapi-plugins.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 1080859..3557d8b 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.10 +Version: 1.11 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries -- 2.7.4 From c7dbbf166ae0d8157431d1a048ed36626b89913a Mon Sep 17 00:00:00 2001 From: Lukasz Bardeli Date: Thu, 7 Jul 2016 11:14:31 +0200 Subject: [PATCH 07/16] [NBS] Added checking is service available Change-Id: I4238b53dbe09646966308f213a6c397e2d921bfd Signed-off-by: Lukasz Bardeli --- .../networkbearerselection_instance.cc | 7 ++++ .../networkbearerselection_manager.cc | 40 ++++++++++++++++++++++ .../networkbearerselection_manager.h | 3 ++ 3 files changed, 50 insertions(+) diff --git a/src/networkbearerselection/networkbearerselection_instance.cc b/src/networkbearerselection/networkbearerselection_instance.cc index 809c836..babbebf 100644 --- a/src/networkbearerselection/networkbearerselection_instance.cc +++ b/src/networkbearerselection/networkbearerselection_instance.cc @@ -80,6 +80,13 @@ void NetworkBearerSelectionInstance::NetworkBearerSelectionRequestRouteToHost( CHECK_EXIST(args, "domainName", out) CHECK_EXIST(args, "id", out) + const auto status = NetworkBearerSelectionManager::GetInstance()->getCellularState(); + + if (!status) { + LogAndReportError(status, &out, ("Failed to request route to host")); + return; + } + const std::string& domainName = args.get("domainName").get(); const int listenerId = static_cast(args.get("id").get()); diff --git a/src/networkbearerselection/networkbearerselection_manager.cc b/src/networkbearerselection/networkbearerselection_manager.cc index c77a37a..9d145ca 100644 --- a/src/networkbearerselection/networkbearerselection_manager.cc +++ b/src/networkbearerselection/networkbearerselection_manager.cc @@ -191,6 +191,27 @@ void NetworkBearerSelectionManager::connection_closed_callback( } } +common::PlatformResult NetworkBearerSelectionManager::getCellularState() { + + connection_cellular_state_e state; + + int ret = connection_get_cellular_state(m_connection_handle_, &state); + + if (ret != CONNECTION_ERROR_NONE) { + LoggerE("Fail to get connection state. %d", ret); + return common::PlatformResult(GetNBSErrorCode(ret), + "Fail to get connection state."); + } + + if (state == CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE) { + LoggerE("Network cellular have no service. %d", state); + return common::PlatformResult(common::ErrorCode::NOT_SUPPORTED_ERR, + "Fail to get connection state."); + } + return common::PlatformResult(common::ErrorCode::NO_ERROR); +} + + void NetworkBearerSelectionManager::requestRouteToHost( const std::string& domain_name) { LoggerD("NetworkBearerSelectionManager::requestRouteToHost"); @@ -486,5 +507,24 @@ ReleaseEventPtr NetworkBearerSelectionManager::getReleaseEvent(NetworkBearerSele return nullptr; } +common::ErrorCode NetworkBearerSelectionManager::GetNBSErrorCode(int error_code) { + + common::ErrorCode error = common::ErrorCode::UNKNOWN_ERR; + + switch (error_code) { + case CONNECTION_ERROR_OPERATION_FAILED: + error = common::ErrorCode::UNKNOWN_ERR; + break; + case CONNECTION_ERROR_NOT_SUPPORTED: + error = common::ErrorCode::NOT_SUPPORTED_ERR; + break; + default: + error = common::ErrorCode::UNKNOWN_ERR; + break; + } + + return error; +} + } // namespace networkbearerselection } // namespace extension diff --git a/src/networkbearerselection/networkbearerselection_manager.h b/src/networkbearerselection/networkbearerselection_manager.h index baddec5..7e45a58 100644 --- a/src/networkbearerselection/networkbearerselection_manager.h +++ b/src/networkbearerselection/networkbearerselection_manager.h @@ -67,6 +67,8 @@ class NetworkBearerSelectionManager { common::PlatformResult releaseRouteToHost(const std::string& domain_name, const ReleaseReplyCallback& reply_cb); + common::PlatformResult getCellularState(); + static NetworkBearerSelectionManager* GetInstance(); NetworkBearerSelectionManager(const NetworkBearerSelectionManager&) = delete; @@ -89,6 +91,7 @@ class NetworkBearerSelectionManager { void makeErrorCallback(const std::string& domain_name, const char* info); void makeErrorCallback(const std::string& domain_name, const std::string& info); + common::ErrorCode GetNBSErrorCode(int error_code); void makeDisconnectCallback(const std::string& domain_name); void destroyProfileHandle(); RequestEventPtr getRequestEvent(NetworkBearerSelectionRequestEvent* event); -- 2.7.4 From 1e19cccd8429fea5e00d8b8d56885b77b718e646 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Thu, 7 Jul 2016 19:40:29 +0900 Subject: [PATCH 08/16] [version] 1.12 Change-Id: I6f74a582c72e61ead241926fe2affb46d12b4179 --- packaging/webapi-plugins.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 3557d8b..14d7984 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.11 +Version: 1.12 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries -- 2.7.4 From 0016441dc1f374f9f08aadf9ebe6ba84fd8f6b9b Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Fri, 8 Jul 2016 11:49:59 +0900 Subject: [PATCH 09/16] [application] remove useless code to check presence when send replycallback Change-Id: I491579a5786c7e657de93cca6c23bce7801a83f7 --- src/application/requested_application_control.cc | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/application/requested_application_control.cc b/src/application/requested_application_control.cc index 79bbf43..04adbc4 100755 --- a/src/application/requested_application_control.cc +++ b/src/application/requested_application_control.cc @@ -107,14 +107,6 @@ void RequestedApplicationControl::ReplyResult(const picojson::value& args, picoj return; } - // code to check caller liveness - result = VerifyCallerPresence(); - if (result.IsError()) { - LogAndReportError(result, out, - ("Failed VerifyCallerPresence()")); - return; - } - // create reply app_control_h reply; app_control_create(&reply); @@ -159,13 +151,6 @@ void RequestedApplicationControl::ReplyFailure(picojson::object* out) { return; } - // code to check caller liveness - result = VerifyCallerPresence(); - if (result.IsError()) { - LogAndReportError(result, out, ("Failed VerifyCallerPresence()")); - return; - } - // create reply app_control_h reply; app_control_create(&reply); -- 2.7.4 From d55dc5604b6a7821337f25b0a7b7fae61c91062c Mon Sep 17 00:00:00 2001 From: Andrzej Popowski Date: Fri, 8 Jul 2016 17:28:45 +0900 Subject: [PATCH 10/16] [Application] - Fixing undefined iconPath attribute issue TCT result: 99.47% (190/189/0/1/0) Change-Id: I79471656580973c1d22964e4c5caaed7270cf5af Signed-off-by: Andrzej Popowski --- src/application/application_utils.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/application/application_utils.cc b/src/application/application_utils.cc index 9cf23d5..1c39776 100644 --- a/src/application/application_utils.cc +++ b/src/application/application_utils.cc @@ -39,6 +39,7 @@ void ApplicationUtils::CreateApplicationInformation(const pkgmgrinfo_appinfo_h h ret = pkgmgrinfo_appinfo_get_appid(handle, &tmp_str); if ((PMINFO_R_OK != ret) || (nullptr == tmp_str)) { LoggerE("Failed to get appid: %d (%s)", ret, get_error_message(ret)); + app_info->insert(std::make_pair("id", picojson::value(""))); } else { app_info->insert(std::make_pair("id", picojson::value(tmp_str))); } @@ -57,6 +58,7 @@ void ApplicationUtils::CreateApplicationInformation(const pkgmgrinfo_appinfo_h h ret = pkgmgrinfo_appinfo_get_icon(handle, &tmp_str); if ((PMINFO_R_OK != ret) || (nullptr == tmp_str)) { LoggerE("Failed to get icon path: %d (%s)", ret, get_error_message(ret)); + app_info->insert(std::make_pair("iconPath", picojson::value(""))); } else { app_info->insert(std::make_pair("iconPath", picojson::value(tmp_str))); } @@ -67,6 +69,7 @@ void ApplicationUtils::CreateApplicationInformation(const pkgmgrinfo_appinfo_h h ret = pkgmgrinfo_appinfo_is_nodisplay(handle, &no_display); if (PMINFO_R_OK != ret) { LoggerE("Failed to get nodisplay: %d (%s)", ret, get_error_message(ret)); + app_info->insert(std::make_pair("show", picojson::value(false))); } else { app_info->insert(std::make_pair("show", picojson::value(!no_display))); } -- 2.7.4 From e70dd941d819ab7555a41fc2c6e9a30a9b8d4a5e Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Fri, 8 Jul 2016 17:58:42 +0900 Subject: [PATCH 11/16] [version] 1.13 Change-Id: I7e765b0c482c8296bfb403bd2e643bb6aab00b80 --- packaging/webapi-plugins.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 14d7984..441ed80 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.12 +Version: 1.13 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries -- 2.7.4 From d4edef757216de89a5b237253f4876d6d1e5d649 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Fri, 8 Jul 2016 19:10:41 +0900 Subject: [PATCH 12/16] [version] 1.14 Change-Id: I249a6b07892ba8d348d249c49612ac9b5befd6dc --- packaging/webapi-plugins.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 441ed80..b5ce1eb 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.13 +Version: 1.14 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries -- 2.7.4 From e2cbe720924344b0cd43000f1f1394a1df798e9e Mon Sep 17 00:00:00 2001 From: Piotr Kosko Date: Fri, 8 Jul 2016 12:46:53 +0200 Subject: [PATCH 13/16] [Preference] Improved behaviour on removing key [Feature] Removing listener also when key was removed. [Verification] Code compiles without errors. TCT passrate is 100%. Change-Id: I4aa9c6f4ffea08b526dad26e39fe67c8fd076fb0 Signed-off-by: Piotr Kosko --- src/preference/preference_manager.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/preference/preference_manager.cc b/src/preference/preference_manager.cc index 2461f3f..e24be80 100644 --- a/src/preference/preference_manager.cc +++ b/src/preference/preference_manager.cc @@ -214,8 +214,14 @@ common::TizenResult PreferenceManager::GetValue(const std::string& key) { common::TizenResult PreferenceManager::Remove(const std::string& key) { ScopeLogger(); - int ret = preference_remove(key.c_str()); + // unsetting listener if it is registered for key to be removed + auto res = UnsetChangeListener(key); + if (!res) { + //only log an error - listener could not be set + LoggerD("unsetting listener for given key failed, ignore error"); + } + int ret = preference_remove(key.c_str()); if (ret == PREFERENCE_ERROR_NONE) { return common::TizenSuccess(); } else { @@ -227,8 +233,9 @@ common::TizenResult PreferenceManager::RemoveAll() { ScopeLogger(); int ret = preference_remove_all(); - if (ret == PREFERENCE_ERROR_NONE) { + //only clear vector (listeners are removed natively in preference_remove_all function) + key_listeners_.clear(); return common::TizenSuccess(); } else { return MakeErrResult(ret, "preference_remove_all function error"); -- 2.7.4 From 8d11ea4eebcddd7989ce2002a885a318e8a3b37e Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Fri, 8 Jul 2016 20:01:40 +0900 Subject: [PATCH 14/16] [version] 1.15 Change-Id: Ia8dbadfc1557f5265eefa097d06c4aa3bfede987 --- packaging/webapi-plugins.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index b5ce1eb..495a605 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.14 +Version: 1.15 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries -- 2.7.4 From 0550028f26a3cbb6b42d778e86b00f4dfb06b638 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Mon, 11 Jul 2016 15:34:44 +0900 Subject: [PATCH 15/16] disable telephony feature due to beta release - this fix is related with capability TC ( NBS, callhistory ) Change-Id: I13016ab476e371704d7c867f3a5ab29d03a1f75e --- packaging/webapi-plugins.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 495a605..46638a6 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -10,7 +10,7 @@ %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions} Name: webapi-plugins -Version: 1.15 +Version: 1.16 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries @@ -149,7 +149,11 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_sound_support 1 %define tizen_feature_system_info_support 1 %define tizen_feature_system_setting_support 1 +%if 0%{?tizen_is_emulator} +%define tizen_feature_telephony_support 0 +%else %define tizen_feature_telephony_support 1 +%endif %define tizen_feature_time_support 1 %define tizen_feature_web_setting_support 1 %define tizen_feature_widget_service_support 1 -- 2.7.4 From 71f1d61215fb28a62eb9352fb09bfb23b274ce5e Mon Sep 17 00:00:00 2001 From: Piotr Kosko Date: Wed, 13 Jul 2016 14:21:11 +0200 Subject: [PATCH 16/16] [Systeminfo] Return partial results for STORAGE if dbus fail [Feature] If dbus call failed, results was empty. Now returned array will hold as much data as it is possible, internal storage information would be returned. DBUS fails would be silent. [Verification] Code compiles without errors. TCT passrate is 100%. Change-Id: I65a98a95ab69416af5c61737eb93f98a7d7c3625 Signed-off-by: Piotr Kosko --- src/common/filesystem/filesystem_provider_deviced.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/common/filesystem/filesystem_provider_deviced.cc b/src/common/filesystem/filesystem_provider_deviced.cc index 81bb570..3c22667 100644 --- a/src/common/filesystem/filesystem_provider_deviced.cc +++ b/src/common/filesystem/filesystem_provider_deviced.cc @@ -231,6 +231,11 @@ Storages FilesystemProviderDeviced::GetStorages() { return Storages(); } + // internal storages are gathered with storage api + Storages internal = virtual_roots_provider_.GetStorages(); + + // external storages are gathered using deviced implementation + Storages result; GError* error = nullptr; GVariant* variant = g_dbus_connection_call_sync(dbus_, kBus, @@ -246,12 +251,10 @@ Storages FilesystemProviderDeviced::GetStorages() { if (!variant || error) { std::string message = error ? error->message : ""; LoggerE("Failed to call GetDeviceList method - %s", message.c_str()); - return Storages(); + } else { + LoggerD("GetDeviceList succeed - handling result"); + result = GetStoragesFromGVariant(variant); } - // internal storages are gathered with storage api - Storages internal = virtual_roots_provider_.GetStorages(); - // external storages are gathered using deviced implementation - Storages result = GetStoragesFromGVariant(variant); // merging internal and external results together, but internal on the beginning result.insert(result.begin(), internal.begin(), internal.end()); -- 2.7.4