Partial fix for CB-1742, still don't know what this should do for notification.confirm's cancel, so we return zero for now

This commit is contained in:
Joe Bowser 2012-10-25 14:13:17 -07:00
parent 7f4ee7b20a
commit 49566d29f8

View File

@ -163,6 +163,14 @@ public class Notification extends CordovaPlugin {
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
}
});
dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
public void onCancel(DialogInterface dialog)
{
dialog.dismiss();
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
}
});
dlg.create();
dlg.show();
};
@ -225,6 +233,13 @@ public class Notification extends CordovaPlugin {
}
);
}
dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
public void onCancel(DialogInterface dialog)
{
dialog.dismiss();
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
}
});
dlg.create();
dlg.show();