From 7d5bd6089559f8e1ba034da99815363a6fcc7e8d Mon Sep 17 00:00:00 2001 From: "taekeun.kang" Date: Mon, 30 May 2016 14:54:54 +0900 Subject: [PATCH] [HAM] change codes to check whether the option is undefied [version] 0.89 Change-Id: Ic83d343669a4e283de1d3f637a0c07a80d983b21 Signed-off-by: taekeun.kang --- packaging/webapi-plugins.spec | 2 +- src/humanactivitymonitor/humanactivitymonitor_api.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec index 19fc590c..42571c62 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: 0.88 +Version: 0.89 Release: 0 License: Apache-2.0 and BSD-2.0 and MIT Group: Development/Libraries diff --git a/src/humanactivitymonitor/humanactivitymonitor_api.js b/src/humanactivitymonitor/humanactivitymonitor_api.js index 63bb34ad..fd442d97 100755 --- a/src/humanactivitymonitor/humanactivitymonitor_api.js +++ b/src/humanactivitymonitor/humanactivitymonitor_api.js @@ -246,13 +246,13 @@ HumanActivityMonitorManager.prototype.start = function(type, changedCallback) { switch (args.type) { case HumanActivityType.GPS: - callbackInterval = !type_.isNullOrUndefined(args.option) ? + callbackInterval = !type_.isNullOrUndefined(args.option.callbackInterval) ? args.option.callbackInterval : 150000; - sampleInterval = !type_.isNullOrUndefined(args.option) ? + sampleInterval = !type_.isNullOrUndefined(args.option.sampleInterval) ? args.option.sampleInterval : 1000; break; case HumanActivityType.HRM: - callbackInterval = !type_.isNullOrUndefined(args.option) ? + callbackInterval = !type_.isNullOrUndefined(args.option.callbackInterval) ? args.option.callbackInterval : 100; if (callbackInterval < 10 || callbackInterval > 1000) { throw new WebAPIException(WebAPIException.INVALID_VALUES_ERR, -- 2.34.1