cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: Partial fix for CB-1742, still don't know what this should do for notification.confirm's cancel, so we return zero for now
Date Thu, 25 Oct 2012 21:13:54 GMT
Updated Branches:
  refs/heads/master 7f4ee7b20 -> 49566d29f


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


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/49566d29
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/49566d29
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/49566d29

Branch: refs/heads/master
Commit: 49566d29f8cea486b300a8c356d56f9d847f4031
Parents: 7f4ee7b
Author: Joe Bowser <bowserj@apache.org>
Authored: Thu Oct 25 14:13:17 2012 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu Oct 25 14:13:17 2012 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/Notification.java |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/49566d29/framework/src/org/apache/cordova/Notification.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Notification.java b/framework/src/org/apache/cordova/Notification.java
index f0d77b7..958ab26 100755
--- a/framework/src/org/apache/cordova/Notification.java
+++ b/framework/src/org/apache/cordova/Notification.java
@@ -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();


Mime
View raw message