From 33c8e806af460f0d5903c3e7e1b65073a31d75de Mon Sep 17 00:00:00 2001 From: Pawel Andruszkiewicz Date: Thu, 27 Aug 2015 12:00:33 +0200 Subject: [PATCH] [Notification] Added privilege checks to LED methods. [Verification] TCT pass rate (r36) has decreased, since TCT app does not specify the 'http://tizen.org/privilege/led' privilege: 93.55% (93/87/6/0/0) Change-Id: I11f9bed4a3efb5127f614609dbb2c160f3c21798 Signed-off-by: Pawel Andruszkiewicz --- src/notification/notification_api.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/notification/notification_api.js b/src/notification/notification_api.js index 33a36cbc..aefbeffa 100644 --- a/src/notification/notification_api.js +++ b/src/notification/notification_api.js @@ -226,6 +226,8 @@ NotificationManager.prototype.getAll = function() { * @param flags Array */ NotificationManager.prototype.playLEDCustomEffect = function(timeOn, timeOff, color, flags) { + xwalk.utils.checkPrivilegeAccess(xwalk.utils.privilege.LED); + var args = validator_.validateArgs(arguments, [ {name: 'timeOn', type: types_.LONG}, {name: 'timeOff', type: types_.LONG}, @@ -250,6 +252,8 @@ NotificationManager.prototype.playLEDCustomEffect = function(timeOn, timeOff, co * Stops the custom effect of the service LED that is located to the front of a device. */ NotificationManager.prototype.stopLEDCustomEffect = function() { + xwalk.utils.checkPrivilegeAccess(xwalk.utils.privilege.LED); + var result = native_.callSync('NotificationManager_stopLEDCustomEffect'); if (native_.isFailure(result)) { throw native_.getErrorObject(result); -- 2.34.1