//class AlarmManager ////////////////////////////////////////////////////
AlarmManager.prototype.add = function() {
- var args = AV.validateMethod(arguments, [
+ var args = AV.validateArgs(arguments, [
{
name: 'alarm',
type: AV.Types.PLATFORM_OBJECT,
};
AlarmManager.prototype.addAlarmNotification = function() {
- var args = AV.validateMethod(arguments, [
+ var args = AV.validateArgs(arguments, [
{
name: 'alarm',
type: AV.Types.PLATFORM_OBJECT,
};
AlarmManager.prototype.remove = function() {
- var args = AV.validateMethod(arguments, [
+ var args = AV.validateArgs(arguments, [
{
name: 'id',
type: AV.Types.STRING
};
AlarmManager.prototype.get = function() {
- var args = AV.validateMethod(arguments, [
+ var args = AV.validateArgs(arguments, [
{
name: 'id',
type: AV.Types.STRING
result.period,
InternalData_(result)
);
- } else {
+ } else if ('AlarmAbsolute' === result.type) {
var date = new Date(
result.year,
result.month,
);
alarm = new tizen.AlarmAbsolute(date, result.second, InternalData_(result));
+ } else {
+ alarm = new Alarm(InternalData_(result));
}
_warningLogs.allow();
return alarm;
}
AlarmManager.prototype.getAlarmNotification = function() {
- var args = AV.validateMethod(arguments, [
+ var args = AV.validateArgs(arguments, [
{
name: 'id',
type: AV.Types.STRING
data.forEach(function(i) {
if ('AlarmRelative' === i.type) {
md.push(new tizen.AlarmRelative(i.delay, i.period, InternalData_(i)));
- } else {
+ } else if ('AlarmAbsolute' === i.type) {
var date = new Date(i.year, i.month, i.day, i.hour, i.min, i.sec);
md.push(new tizen.AlarmAbsolute(date, i.second, InternalData_(i)));
+ } else {
+ md.push(new Alarm(InternalData_(i)));
}
});
_warningLogs.allow();
var _profile = ProfileAlarm.getInstance().profile;
// Notifications feature are available on mobile and wearable profile
-if (_profile != 'mobile' && _profile != 'wearable') {
+if (_profile != 'mobile' && _profile != 'wearable' && _profile != 'common') {
delete AlarmManager.prototype.addAlarmNotification;
delete AlarmManager.prototype.getAlarmNotification;
isAlarmAbsolutePeriodDeprecated = false;