From 852f44bb739f858dec4d2aae13b94f202c511e8e Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Thu, 22 Dec 2016 13:39:55 +0900 Subject: [PATCH 01/16] [common] add dependency - VD department's request : 'undefined symbol: app_get_data_path' issue of TV product Change-Id: Idba0a821044c083a5aa6337f898038a8e0cec896 --- src/common/common.gyp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/common.gyp b/src/common/common.gyp index 322b086..64404f8 100644 --- a/src/common/common.gyp +++ b/src/common/common.gyp @@ -68,6 +68,7 @@ 'variables': { 'packages': [ 'capi-appfw-app-manager', + 'capi-appfw-app-common', 'capi-appfw-package-manager', 'storage', 'security-privilege-manager', -- 2.7.4 From 7f6f1b4d4cc81381bcf04c6be61d52ca3d8a4d80 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Thu, 22 Dec 2016 15:11:24 +0900 Subject: [PATCH 02/16] [common] replace cynara_simple_check() with cynara_check() cause: TSAM-11968 [SE][Store_App][Tizen_3.0_Public_Final_RC7][Mobile][000000062608_VaccineReminder.wgt]White screen after launch app and can't exit by back key [verfication] result of web TCT are passed on filesystem, privilege, calendar Change-Id: Ibd9a9cb243bf13e2e635e5e598b00ed891718f35 --- src/common/tools.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/tools.cc b/src/common/tools.cc index 21f5064..8a6a3d3 100644 --- a/src/common/tools.cc +++ b/src/common/tools.cc @@ -199,12 +199,12 @@ class AccessControlImpl { if (cynara_) { for (const auto& privilege : privileges) { - if (CYNARA_API_ACCESS_ALLOWED != cynara_simple_check(cynara_, // p_cynara - smack_label_.c_str(), // client - "", // client_session - uid_.c_str(), // user - privilege.c_str() // privilege - )) { + if (CYNARA_API_ACCESS_ALLOWED != cynara_check(cynara_, // p_cynara + smack_label_.c_str(), // client + "", // client_session + uid_.c_str(), // user + privilege.c_str() // privilege + )) { return false; } } -- 2.7.4 From 1e231a1f2de10b54cd741ea85039832144ef63f0 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Thu, 22 Dec 2016 15:30:08 +0900 Subject: [PATCH 03/16] [version] 1.61 Change-Id: I35a053975fa863145e998df83293d48fb7a96c36 --- 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 830ab56..6418847 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.60 +Version: 1.61 Release: 0 License: Apache-2.0 and BSD-3-Clause and MIT Group: Development/Libraries -- 2.7.4 From 705841e5ded5881e45c84086c6ee8f89129b8b81 Mon Sep 17 00:00:00 2001 From: Tomasz Marciniak Date: Wed, 21 Dec 2016 14:49:19 +0100 Subject: [PATCH 04/16] [Convergence] launch() adjusted to the native api change. [Verification] Code compiles. In case of launch failure error callback is called. Change-Id: I58d4a221f4a410b82545eaea56090a02fdba7a04 Signed-off-by: Tomasz Marciniak --- src/convergence/convergence_api.js | 39 ++++++++++++---------- .../convergence_remote_app_control_service.cc | 10 ++++-- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/convergence/convergence_api.js b/src/convergence/convergence_api.js index 993c447..220b5c2 100644 --- a/src/convergence/convergence_api.js +++ b/src/convergence/convergence_api.js @@ -260,7 +260,9 @@ function Service(connectionState_, type_) { } native_.addListener('REMOTE_APP_CONTROL_SERVICE_LISTENER', function(result) { - if (native_.isFailure(result)) { + var result_type = result.result_type; + + if (native_.isFailure(result) && 'onPublish' != result_type) { //native_.callIfPossible(errorCallback, native_.getErrorObject(result)); } else { // Invoke corresponding callback @@ -270,8 +272,6 @@ native_.addListener('REMOTE_APP_CONTROL_SERVICE_LISTENER', function(result) { } var s = convergenceServices[lid]; - var result_type = result.result_type; - switch (result_type) { case 'Connected': if (s) { // Service MUST NOT be null here @@ -282,17 +282,18 @@ native_.addListener('REMOTE_APP_CONTROL_SERVICE_LISTENER', function(result) { break; case 'onPublish': var remote_func = result.remote_function; - if ('launch' === remote_func) { - native_.callIfPossible(s._remoteAppControlCallback); - } else if ('launchAppControl' === remote_func) { - var callback = result.callback_result; - var d = undefined; - if ('onsuccess' === callback) { - d = result.reply ? new tizen.ApplicationControlData('reply', [result.reply]) : null; - } + var callback = result.callback_result; + var d = undefined; - native_.callIfPossible(s._remoteAppControlCallback[callback], d); + if ('launchAppControl' === remote_func && 'onsuccess' === callback) { + d = result.reply ? new tizen.ApplicationControlData('reply', [result.reply]) : null; } + + if ('launch' === remote_func && 'onfailure' === callback) { + d = new WebAPIException(WebAPIException.ABORT_ERR, 'Launching application failed'); + } + + native_.callIfPossible(s._remoteAppControlCallback[callback], d); break; case 'onStart': native_.callIfPossible(s._startCallback, s); @@ -515,11 +516,15 @@ RemoteAppControlService.prototype.launch = function(appId, successCallback, erro ]); var lid = this._serviceId; - // TODO In fact it must be a list of callbacks - // But until D2D FW supports transaction management, it is meaningless to - // have more than one callback, because all payload is delivered to - // a single point without identification of initial request - this._remoteAppControlCallback = successCallback; + + //Both callbacks have to be saved as launch on remote device + //can be finished with success or error, e.g. when there + //is no application with given Id + var remoteCallback = {}; + remoteCallback.onsuccess = successCallback; + remoteCallback.onfailure = errorCallback; + + this._remoteAppControlCallback = remoteCallback; convergenceServices[lid] = this; var result = native_.call('RemoteAppControlService_launch', { diff --git a/src/convergence/convergence_remote_app_control_service.cc b/src/convergence/convergence_remote_app_control_service.cc index d10a370..596dbd6 100644 --- a/src/convergence/convergence_remote_app_control_service.cc +++ b/src/convergence/convergence_remote_app_control_service.cc @@ -239,10 +239,10 @@ void ConvergenceRemoteAppControlService::ServiceListenerCb(conv_service_h servic } else { param[kCbResult] = picojson::value("onfailure"); } + } else if (kLaunch == callbackParam->remote_method_) { + param[kCbResult] = picojson::value("onsuccess"); } - //in case of launch() method there is no information received if it finished - //with success or error, so we assume optimistic success param[kServiceListenerStatus] = picojson::value(kServiceListenerStatusOk); callbackParam->plugin_->ReplyAsync(kRemoteAppControlListenerCallback, callbackParam->callback_id_, @@ -257,6 +257,12 @@ void ConvergenceRemoteAppControlService::ServiceListenerCb(conv_service_h servic } } else { // Error occurred during connection + // if error was caused by launch() function (onPublish) it has to be handled saparately + if (kServiceResultTypeOnPublish == result_type && kLaunch == callbackParam->remote_method_) { + param[kRemoteFunc] = picojson::value(callbackParam->remote_method_); + param[kCbResult] = picojson::value("onfailure"); + } + param[kServiceListenerStatus] = picojson::value(kServiceListenerStatusError); param[kServiceListenerError] = picojson::value(static_cast(error)); callbackParam->plugin_->ReplyAsync(kRemoteAppControlListenerCallback, -- 2.7.4 From 1b696624bbb749dbaa792e93284d39318560e2a8 Mon Sep 17 00:00:00 2001 From: "taekeun.kang" Date: Tue, 11 Oct 2016 11:43:39 +0900 Subject: [PATCH 05/16] [Spec] Enable Push API for TV profile Change-Id: Icdff9cc656cf5e17165d7da7a622a55ffccede1f Signed-off-by: taekeun.kang --- 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 6418847..dac8079 100644 --- a/packaging/webapi-plugins.spec +++ b/packaging/webapi-plugins.spec @@ -354,7 +354,7 @@ Source0: %{name}-%{version}.tar.gz %define tizen_feature_player_util_support 0 %define tizen_feature_power_support 0 %define tizen_feature_preference_support 0 -%define tizen_feature_push_support 0 +%define tizen_feature_push_support 1 %define tizen_feature_se_support 0 %define tizen_feature_sensor_support 0 %define tizen_feature_sound_support 0 -- 2.7.4 From d78ca0627dd456019d86f330771951ca54da2487 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Fri, 23 Dec 2016 17:49:41 +0900 Subject: [PATCH 06/16] [version] 1.62 Change-Id: Ida9bbb6e21dacf41fcd7aa775e6013c1b082fdc7 --- 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 dac8079..ffa23cd 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.61 +Version: 1.62 Release: 0 License: Apache-2.0 and BSD-3-Clause and MIT Group: Development/Libraries -- 2.7.4 From bda17d2ceb773ebcc2ad909ef25de24c3a215bf1 Mon Sep 17 00:00:00 2001 From: "taekeun.kang" Date: Fri, 23 Dec 2016 19:07:54 +0900 Subject: [PATCH 07/16] [Common] fix depedency Change-Id: Ia6b015986431da5cab445a2f5506b4596d0bcf1d Signed-off-by: taekeun.kang --- src/common/common.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/common.gyp b/src/common/common.gyp index 64404f8..7f4e78e 100644 --- a/src/common/common.gyp +++ b/src/common/common.gyp @@ -68,7 +68,7 @@ 'variables': { 'packages': [ 'capi-appfw-app-manager', - 'capi-appfw-app-common', + 'capi-appfw-application', 'capi-appfw-package-manager', 'storage', 'security-privilege-manager', -- 2.7.4 From 59008d2c97c5400013d25d51322abc8d8df1f636 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Fri, 23 Dec 2016 19:27:48 +0900 Subject: [PATCH 08/16] [version] 1.63 Change-Id: Ief8e1c82802f55fe3368b570cb1ee62e32e0358c --- 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 ffa23cd..ea17ecd 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.62 +Version: 1.63 Release: 0 License: Apache-2.0 and BSD-3-Clause and MIT Group: Development/Libraries -- 2.7.4 From cf6b337675adf1428358e5bb1b95911e0320cc3b Mon Sep 17 00:00:00 2001 From: "jk.pu" Date: Tue, 27 Dec 2016 14:57:25 +0900 Subject: [PATCH 09/16] [systeminfo] fix error of tizen.systeminfo.getPropertyValue("LOCALE"...) wrt already set system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE,..) this api is singleton , only one cb can be registered in each process. change API to vconf_notify_key_changed() instead of system_settings_set_changed_cb verification : check behavior and web tct. systeminfo 100% passed. Change-Id: I7ec858317ac8d58b3b11190f58187cf96c342bf6 Signed-off-by: jk.pu --- src/systeminfo/systeminfo_manager.cc | 41 +++++++++++++++--------------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/src/systeminfo/systeminfo_manager.cc b/src/systeminfo/systeminfo_manager.cc index e20c332..a0bdc62 100644 --- a/src/systeminfo/systeminfo_manager.cc +++ b/src/systeminfo/systeminfo_manager.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include "common/converter.h" #include "common/logger.h" @@ -166,7 +167,7 @@ static void OnDeviceOrientationChangedCb(sensor_t sensor, unsigned int event_typ manager->CallListenerCallback(kPropertyIdDeviceOrientation); } -static void OnLocaleChangedCb(system_settings_key_e key, void* event_ptr) { +static void OnLocaleChangedCb(keynode_t* node, void* event_ptr) { LoggerD("Enter"); SysteminfoManager* manager = static_cast(event_ptr); manager->CallListenerCallback(kPropertyIdLocale); @@ -1041,35 +1042,27 @@ PlatformResult SysteminfoManager::UnregisterDeviceOrientationListener() { PlatformResult SysteminfoManager::RegisterLocaleListener() { LoggerD("Entered"); - int ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, - OnLocaleChangedCb, static_cast(this)); - if (SYSTEM_SETTINGS_ERROR_NONE != ret) { - return LogAndCreateResult( - ErrorCode::UNKNOWN_ERR, "Country change callback registration failed", - ("system_settings_set_changed_cb error: %d (%s)", ret, get_error_message(ret))); - } - - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, - OnLocaleChangedCb, static_cast(this)); - if (SYSTEM_SETTINGS_ERROR_NONE != ret) { - return LogAndCreateResult( - ErrorCode::UNKNOWN_ERR, "Language change callback registration failed", - ("system_settings_set_changed_cb error: %d (%s)", ret, get_error_message(ret))); - } + PlatformResult ret = PlatformResult(ErrorCode::NO_ERROR); + CHECK_LISTENER_ERROR( + SysteminfoUtils::RegisterVconfCallback(VCONFKEY_REGIONFORMAT, + OnLocaleChangedCb, this)) + CHECK_LISTENER_ERROR( + SysteminfoUtils::RegisterVconfCallback(VCONFKEY_LANGSET, + OnLocaleChangedCb, this)) LoggerD("Added callback for LOCALE"); return PlatformResult(ErrorCode::NO_ERROR); } PlatformResult SysteminfoManager::UnregisterLocaleListener() { LoggerD("Entered"); - if (SYSTEM_SETTINGS_ERROR_NONE != - system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE) ) { - LoggerE("Unregistration of language change callback failed"); - } - if (SYSTEM_SETTINGS_ERROR_NONE != - system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY) ) { - LoggerE("Unregistration of country change callback failed"); - } + PlatformResult ret = PlatformResult(ErrorCode::NO_ERROR); + CHECK_LISTENER_ERROR( + SysteminfoUtils::UnregisterVconfCallback(VCONFKEY_REGIONFORMAT, + OnLocaleChangedCb)) + CHECK_LISTENER_ERROR( + SysteminfoUtils::UnregisterVconfCallback(VCONFKEY_LANGSET, + OnLocaleChangedCb)) + LoggerD("Removed callback for LOCALE"); return PlatformResult(ErrorCode::NO_ERROR); } -- 2.7.4 From 8eee15b56144b4376271a409a7798917e1416dfa Mon Sep 17 00:00:00 2001 From: "jk.pu" Date: Tue, 27 Dec 2016 20:41:03 +0900 Subject: [PATCH 10/16] [systemInfo] add cpu arch 'aarch64' and 'x86_64' TM2 target cpu arch is aarch64. but return 'armv7' verification: checked return value. systeminfo tct 100 % passed. Change-Id: I401403afa9328e6d8b153dbc06f66dcc0d87d6aa Signed-off-by: jk.pu --- src/systeminfo/systeminfo_device_capability.cc | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/systeminfo/systeminfo_device_capability.cc b/src/systeminfo/systeminfo_device_capability.cc index 736469b..65675fc 100644 --- a/src/systeminfo/systeminfo_device_capability.cc +++ b/src/systeminfo/systeminfo_device_capability.cc @@ -53,7 +53,9 @@ const char* kOpenglesTexturePvrtc = "pvrtc"; const char* kPlatformCoreDelimiter = " | "; const char* kPlatformCoreArmv6 = "armv6"; const char* kPlatformCoreArmv7 = "armv7"; +const char* kPlatformCoreAarch64 = "aarch64"; const char* kPlatformCoreX86 = "x86"; +const char* kPlatformCoreX86_64 = "x86_64"; //core fpu arch const char* kPlatformCoreSse2 = "sse2"; const char* kPlatformCoreSse3 = "sse3"; @@ -409,7 +411,14 @@ PlatformResult SystemInfoDeviceCapability::GetOpenglesTextureFormat(std::string* PlatformResult SystemInfoDeviceCapability::GetPlatfomCoreCpuArch(std::string* return_value) { std::string result; bool bool_result = false; - PlatformResult ret = GetValueBool("tizen.org/feature/platform.core.cpu.arch.armv6", &bool_result); + std::string arch = ""; + + PlatformResult ret =SystemInfoDeviceCapability::GetValueString("tizen.org/feature/platform.core.cpu.arch", &arch); + if (ret.IsError()) { + LoggerE("GetValueString Error"); + } + + ret = GetValueBool("tizen.org/feature/platform.core.cpu.arch.armv6", &bool_result); if (ret.IsError()) { return ret; } @@ -425,7 +434,12 @@ PlatformResult SystemInfoDeviceCapability::GetPlatfomCoreCpuArch(std::string* re if (!result.empty()) { result += kPlatformCoreDelimiter; } - result += kPlatformCoreArmv7; + + if(arch.compare("aarch64") == 0){ + result += kPlatformCoreAarch64; + }else{ + result += kPlatformCoreArmv7; + } } ret = GetValueBool("tizen.org/feature/platform.core.cpu.arch.x86", &bool_result); @@ -436,7 +450,11 @@ PlatformResult SystemInfoDeviceCapability::GetPlatfomCoreCpuArch(std::string* re if (!result.empty()) { result += kPlatformCoreDelimiter; } - result += kPlatformCoreX86; + if(arch.compare("x86_64") == 0){ + result += kPlatformCoreX86_64; + }else{ + result += kPlatformCoreX86; + } } if (result.empty()) { -- 2.7.4 From 766df7c791b6fdb912e8cacfe0881ed08843179f Mon Sep 17 00:00:00 2001 From: Andrzej Popowski Date: Wed, 21 Dec 2016 14:15:07 +0100 Subject: [PATCH 11/16] [HAM] - change stop and unsetAccumulativePedometerListener functions Change-Id: I61286b34bcccaf43d44fdd0b7a50e8cc2b717de6 Signed-off-by: Andrzej Popowski --- src/humanactivitymonitor/humanactivitymonitor_api.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/humanactivitymonitor/humanactivitymonitor_api.js b/src/humanactivitymonitor/humanactivitymonitor_api.js index 2d2d65e..0e3dff4 100755 --- a/src/humanactivitymonitor/humanactivitymonitor_api.js +++ b/src/humanactivitymonitor/humanactivitymonitor_api.js @@ -354,9 +354,11 @@ HumanActivityMonitorManager.prototype.stop = function(type) { {name: 'type', type: types_.ENUM, values: Object.keys(HumanActivityType)} ]); - stopListener('HumanActivityMonitor_' + args.type, - 'HumanActivityMonitorManager_stop', - { type: args.type }); + if (!pedometerListener || !accumulativePedometerListener) { + stopListener('HumanActivityMonitor_' + args.type, + 'HumanActivityMonitorManager_stop', + { type: args.type }); + } if (HumanActivityType.PEDOMETER === args.type) { pedometerListener = null; -- 2.7.4 From 4a46baee7f6111006c575c9f7ec3b4b635680469 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Wed, 28 Dec 2016 10:36:48 +0900 Subject: [PATCH 12/16] [version] 1.64 Change-Id: Ia9f43f620de50efeaf4f4933b1270f5c588bb964 --- 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 ea17ecd..3b36120 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.63 +Version: 1.64 Release: 0 License: Apache-2.0 and BSD-3-Clause and MIT Group: Development/Libraries -- 2.7.4 From 07625fed714ee2553e740b7b5bd103b4bebb4a73 Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Wed, 28 Dec 2016 00:55:42 -0800 Subject: [PATCH 13/16] Revert "[HAM] - change stop and unsetAccumulativePedometerListener functions" This reverts commit 766df7c791b6fdb912e8cacfe0881ed08843179f. Change-Id: I149114fee5bdafff262e3d02d6465cf2ca0bd8d3 --- src/humanactivitymonitor/humanactivitymonitor_api.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/humanactivitymonitor/humanactivitymonitor_api.js b/src/humanactivitymonitor/humanactivitymonitor_api.js index 0e3dff4..2d2d65e 100755 --- a/src/humanactivitymonitor/humanactivitymonitor_api.js +++ b/src/humanactivitymonitor/humanactivitymonitor_api.js @@ -354,11 +354,9 @@ HumanActivityMonitorManager.prototype.stop = function(type) { {name: 'type', type: types_.ENUM, values: Object.keys(HumanActivityType)} ]); - if (!pedometerListener || !accumulativePedometerListener) { - stopListener('HumanActivityMonitor_' + args.type, - 'HumanActivityMonitorManager_stop', - { type: args.type }); - } + stopListener('HumanActivityMonitor_' + args.type, + 'HumanActivityMonitorManager_stop', + { type: args.type }); if (HumanActivityType.PEDOMETER === args.type) { pedometerListener = null; -- 2.7.4 From 5d500328c1934fa0411d92c34016040b47bbe97e Mon Sep 17 00:00:00 2001 From: Hyunjin Park Date: Wed, 28 Dec 2016 17:59:52 +0900 Subject: [PATCH 14/16] [version] 1.65 Change-Id: Ibbadee5e120c6aceaae923157a9fefb2b21596fe --- 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 3b36120..b0dfd6d 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.64 +Version: 1.65 Release: 0 License: Apache-2.0 and BSD-3-Clause and MIT Group: Development/Libraries -- 2.7.4 From dbe8157f28394a8bba37a3ecab194c67e360209a Mon Sep 17 00:00:00 2001 From: Andrzej Popowski Date: Wed, 28 Dec 2016 11:12:47 +0100 Subject: [PATCH 15/16] [HAM] - fixing pedometer listeners Change-Id: Ia9acbdb41e269ded7e246d08948c9556c30f6735 Signed-off-by: Andrzej Popowski --- .../humanactivitymonitor_api.js | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/humanactivitymonitor/humanactivitymonitor_api.js b/src/humanactivitymonitor/humanactivitymonitor_api.js index 2d2d65e..5c36b72 100755 --- a/src/humanactivitymonitor/humanactivitymonitor_api.js +++ b/src/humanactivitymonitor/humanactivitymonitor_api.js @@ -354,12 +354,17 @@ HumanActivityMonitorManager.prototype.stop = function(type) { {name: 'type', type: types_.ENUM, values: Object.keys(HumanActivityType)} ]); - stopListener('HumanActivityMonitor_' + args.type, - 'HumanActivityMonitorManager_stop', - { type: args.type }); - if (HumanActivityType.PEDOMETER === args.type) { + if (pedometerListener && !accumulativePedometerListener) { + stopListener('HumanActivityMonitor_PEDOMETER', + 'HumanActivityMonitorManager_stop', + { type: HumanActivityType.PEDOMETER }); + } pedometerListener = null; + } else { + stopListener('HumanActivityMonitor_' + args.type, + 'HumanActivityMonitorManager_stop', + { type: args.type }); } if (HumanActivityType.GPS === args.type) { @@ -382,13 +387,12 @@ HumanActivityMonitorManager.prototype.setAccumulativePedometerListener = functio }; HumanActivityMonitorManager.prototype.unsetAccumulativePedometerListener = function() { - var oldPedometerListener = pedometerListener; - - // calling stop() will overwrite pedometerListener, needs to be restored afterwards - this.stop(HumanActivityType.PEDOMETER); - + if (accumulativePedometerListener && !pedometerListener) { + stopListener('HumanActivityMonitor_PEDOMETER', + 'HumanActivityMonitorManager_stop', + { type: HumanActivityType.PEDOMETER }); + } accumulativePedometerListener = null; - pedometerListener = oldPedometerListener; }; -- 2.7.4 From fb8cac8559780f7da7fe836aeb84a79e2317449e Mon Sep 17 00:00:00 2001 From: Pawel Wasowski Date: Wed, 28 Dec 2016 17:09:51 +0100 Subject: [PATCH 16/16] [Badge] Return '0' from GetBadgeCount, if a badge does not exist [Verification] tct-badge-tizen-tests pass rate is 100% Change-Id: I976ad1eec84d0b884e944d6dcd90ebf5b05b4c47 --- src/badge/badge_manager.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/badge/badge_manager.cc b/src/badge/badge_manager.cc index e685e2b..8736e84 100755 --- a/src/badge/badge_manager.cc +++ b/src/badge/badge_manager.cc @@ -136,11 +136,10 @@ PlatformResult BadgeManager::GetBadgeCount(const std::string& app_id, LoggerD("badge exist : %d", badge_exist); if (!badge_exist) { - return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, - "badge not exist. app_id: " + app_id); + *count = 0; + return PlatformResult(ErrorCode::NO_ERROR); } - *count = 0; ret = badge_get_count(app_id.c_str(), count); LoggerD("badge_get_count() ret : %d count : %d", ret, *count); -- 2.7.4