From: taekeun.kang Date: Mon, 30 May 2016 05:54:54 +0000 (+0900) Subject: [HAM] change codes to check whether the option is undefied [version] 0.89 X-Git-Tag: submit/tizen/20160601.063935~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d5bd6089559f8e1ba034da99815363a6fcc7e8d;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [HAM] change codes to check whether the option is undefied [version] 0.89 Change-Id: Ic83d343669a4e283de1d3f637a0c07a80d983b21 Signed-off-by: taekeun.kang --- 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,