From: Dawid Juszczak Date: Fri, 22 May 2020 17:58:09 +0000 (+0200) Subject: [5.5][humanactivitymonitor] Deprecate STRESS_MONITOR X-Git-Tag: submit/tizen_5.5/20200526.102615~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F234294%2F3;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [5.5][humanactivitymonitor] Deprecate STRESS_MONITOR [ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-262 [Description] Deprecated methods: - addStressMonitorChangeListener() - removeStressMonitorChangeListener() Deprecated interfaces: - HumanActivityStressMonitorData - StressMonitorDataRange - stressMonitorListener [Verification] builds witout errors Change-Id: I3adffddcca970cb668a65bbb1254564a3bde30b1 Signed-off-by: Dawid Juszczak --- diff --git a/src/humanactivitymonitor/humanactivitymonitor_api.js b/src/humanactivitymonitor/humanactivitymonitor_api.js index f023dea1..28a01d03 100755 --- a/src/humanactivitymonitor/humanactivitymonitor_api.js +++ b/src/humanactivitymonitor/humanactivitymonitor_api.js @@ -154,6 +154,7 @@ function convertActivityRecorderData(type, data) { } function StressMonitorDataRange(label, min, max) { + utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR); validator_.validateConstructorCall(this, tizen.StressMonitorDataRange); var args = validator_.validateArgs(arguments, [ @@ -269,6 +270,10 @@ HumanActivityMonitorManager.prototype.getHumanActivityData = function( throw new WebAPIException(WebAPIException.NOT_SUPPORTED_ERR); } + if (HumanActivityType.STRESS_MONITOR == args.type) { + utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR); + } + var data = { type: args.type }; @@ -380,6 +385,10 @@ HumanActivityMonitorManager.prototype.start = function(type, changedCallback) { ); } + if (HumanActivityType.STRESS_MONITOR == args.type) { + utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR); + } + var listenerId = 'HumanActivityMonitor_' + args.type; var optionsAttributes = ['callbackInterval', 'sampleInterval'], options = args.options || {}; @@ -482,6 +491,10 @@ HumanActivityMonitorManager.prototype.stop = function(type) { ); } + if (HumanActivityType.STRESS_MONITOR == args.type) { + utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR); + } + if (HumanActivityType.PEDOMETER === args.type) { stopListener( 'HumanActivityMonitor_PEDOMETER', @@ -867,6 +880,7 @@ function StressMonitorListenerManager() { } StressMonitorListenerManager.prototype.onListener = function(data) { + utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR); if (stressListener) { stressListener(data); } @@ -919,6 +933,7 @@ StressMonitorListenerManager.prototype.removeListener = function(watchId) { var stressMonitorListener = new StressMonitorListenerManager(); HumanActivityMonitorManager.prototype.addStressMonitorChangeListener = function() { + utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR); utils_.checkPrivilegeAccess(privilege_.HEALTHINFO); var args = validator_.validateMethod(arguments, [ { @@ -936,6 +951,7 @@ HumanActivityMonitorManager.prototype.addStressMonitorChangeListener = function( }; HumanActivityMonitorManager.prototype.removeStressMonitorChangeListener = function() { + utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR); var args = validator_.validateMethod(arguments, [ { name: 'watchId', @@ -1052,6 +1068,7 @@ HumanActivitySleepDetectorData.prototype = new HumanActivityData(); HumanActivitySleepDetectorData.prototype.constructor = HumanActivitySleepMonitorData; function HumanActivityStressMonitorData(data) { + utils_.printDeprecationWarningFor(HumanActivityType.STRESS_MONITOR); SetReadOnlyProperty(this, 'stressScore', data.stressScore); }