Commit 14dfd156 by Sebastián Katzer

Small code changes

parent cbf00120
......@@ -87,7 +87,7 @@ public class LocalNotification extends CordovaPlugin {
cancel(id);
unpersist(id);
execCallback(command);
command.success();
}
});
}
......@@ -97,7 +97,7 @@ public class LocalNotification extends CordovaPlugin {
public void run() {
cancelAll();
unpersistAll();
execCallback(command);
command.success();
}
});
}
......@@ -227,13 +227,13 @@ public class LocalNotification extends CordovaPlugin {
* The notification ID to be check.
* @param callbackContext
*/
public static void isScheduled (String id, CallbackContext callbackContext) {
public static void isScheduled (String id, CallbackContext command) {
SharedPreferences settings = getSharedPreferences();
Map<String, ?> alarms = settings.getAll();
boolean isScheduled = alarms.containsKey(id);
PluginResult result = new PluginResult(PluginResult.Status.OK, isScheduled);
callbackContext.sendPluginResult(result);
command.sendPluginResult(result);
}
/**
......@@ -241,13 +241,13 @@ public class LocalNotification extends CordovaPlugin {
*
* @param callbackContext
*/
public static void getScheduledIds (CallbackContext callbackContext) {
public static void getScheduledIds (CallbackContext command) {
SharedPreferences settings = getSharedPreferences();
Map<String, ?> alarms = settings.getAll();
Set<String> alarmIds = alarms.keySet();
JSONArray pendingIds = new JSONArray(alarmIds);
callbackContext.success(pendingIds);
command.success(pendingIds);
}
/**
......@@ -295,13 +295,6 @@ public class LocalNotification extends CordovaPlugin {
}
/**
* Simply invokes the callback without any parameter.
*/
private static void execCallback (CallbackContext command) {
command.sendPluginResult(new PluginResult(PluginResult.Status.OK));
}
/**
* Fires the given event.
*
* @param {String} event The Name of the event
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment