[Bug] getHumanActivityData method accepts only 'PEDOMETER'
and 'HRM' values of HumanActivityType enum as type
parameter. Any other value should cause NotSupportedError,
but implementation leaded to UnknownError instead.
[Verification] AutoTCT 100% passrate
Change-Id: Id5145d76f8957527e28f42c9b1c3141b11b8e5ca
Signed-off-by: Pawel Kaczmarczyk <p.kaczmarczy@samsung.com>
{name: 'errorCallback', type: types_.FUNCTION, optional: true, nullable: true}
]);
- if (args.type === HumanActivityType.WRIST_UP) {
+ if (-1 === [HumanActivityType.HRM, HumanActivityType.PEDOMETER].indexOf(args.type)) {
throw new WebAPIException(WebAPIException.NOT_SUPPORTED_ERR);
}
- var listenerId = 'HumanActivityMonitor_' + args.type;
-
var data = {
type: args.type
};