You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2012/08/09 16:54:51 UTC
android commit: CB-1217: Clicking back button does not dismiss
navigator.notification.alert() dialog
Updated Branches:
refs/heads/master b297fe6f5 -> 7352a309a
CB-1217: Clicking back button does not dismiss navigator.notification.alert() dialog
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/7352a309
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/7352a309
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/7352a309
Branch: refs/heads/master
Commit: 7352a309a01251e1e3f1345c70867de00f809572
Parents: b297fe6
Author: macdonst <si...@gmail.com>
Authored: Thu Aug 9 10:54:35 2012 -0400
Committer: macdonst <si...@gmail.com>
Committed: Thu Aug 9 10:54:35 2012 -0400
----------------------------------------------------------------------
framework/src/org/apache/cordova/Notification.java | 22 +++++++-------
1 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/7352a309/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 7a866a8..7a06a99 100755
--- a/framework/src/org/apache/cordova/Notification.java
+++ b/framework/src/org/apache/cordova/Notification.java
@@ -49,7 +49,7 @@ public class Notification extends Plugin {
/**
* Executes the request and returns PluginResult.
- *
+ *
* @param action The action to execute.
* @param args JSONArry of arguments for the plugin.
* @param callbackId The callback id used when calling back into JavaScript.
@@ -101,7 +101,7 @@ public class Notification extends Plugin {
/**
* Identifies if action to be executed returns a value and should be run synchronously.
- *
+ *
* @param action The action to execute
* @return T=returns value
*/
@@ -138,7 +138,7 @@ public class Notification extends Plugin {
/**
* Beep plays the default notification ringtone.
- *
+ *
* @param count Number of times to play notification
*/
public void beep(long count) {
@@ -163,7 +163,7 @@ public class Notification extends Plugin {
/**
* Vibrates the device for the specified amount of time.
- *
+ *
* @param time Time to vibrate in ms.
*/
public void vibrate(long time) {
@@ -179,7 +179,7 @@ public class Notification extends Plugin {
* Builds and shows a native Android alert with given Strings
* @param message The message the alert should display
* @param title The title of the alert
- * @param buttonLabel The label of the button
+ * @param buttonLabel The label of the button
* @param callbackId The callback id
*/
public synchronized void alert(final String message, final String title, final String buttonLabel, final String callbackId) {
@@ -193,7 +193,7 @@ public class Notification extends Plugin {
AlertDialog.Builder dlg = new AlertDialog.Builder(cordova.getActivity());
dlg.setMessage(message);
dlg.setTitle(title);
- dlg.setCancelable(false);
+ dlg.setCancelable(true);
dlg.setPositiveButton(buttonLabel,
new AlertDialog.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
@@ -212,7 +212,7 @@ public class Notification extends Plugin {
* Builds and shows a native Android confirm dialog with given title, message, buttons.
* This dialog only shows up to 3 buttons. Any labels after that will be ignored.
* The index of the button pressed will be returned to the JavaScript callback identified by callbackId.
- *
+ *
* @param message The message the dialog should display
* @param title The title of the dialog
* @param buttonLabels A comma separated list of button labels (Up to 3 buttons)
@@ -229,7 +229,7 @@ public class Notification extends Plugin {
AlertDialog.Builder dlg = new AlertDialog.Builder(cordova.getActivity());
dlg.setMessage(message);
dlg.setTitle(title);
- dlg.setCancelable(false);
+ dlg.setCancelable(true);
// First button
if (fButtons.length > 0) {
@@ -274,7 +274,7 @@ public class Notification extends Plugin {
/**
* Show the spinner.
- *
+ *
* @param title Title of the dialog
* @param message The message of the dialog
*/
@@ -310,7 +310,7 @@ public class Notification extends Plugin {
/**
* Show the progress dialog.
- *
+ *
* @param title Title of the dialog
* @param message The message of the dialog
*/
@@ -344,7 +344,7 @@ public class Notification extends Plugin {
/**
* Set value of progress bar.
- *
+ *
* @param value 0-100
*/
public synchronized void progressValue(int value) {