cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/2] android commit: Fix spacing, convert all tabs to spaces
Date Fri, 03 May 2013 17:21:16 GMT
Fix spacing, convert all tabs to spaces


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

Branch: refs/heads/master
Commit: 21614ea891ac350a8f189124b0f532d81ed433cb
Parents: 4b38cce
Author: mbillau <mike.billau@gmail.com>
Authored: Wed Apr 24 14:52:20 2013 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri May 3 13:21:01 2013 -0400

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


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/21614ea8/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 061aebf..cf2e95f 100755
--- a/framework/src/org/apache/cordova/Notification.java
+++ b/framework/src/org/apache/cordova/Notification.java
@@ -33,7 +33,6 @@ import android.media.Ringtone;
 import android.media.RingtoneManager;
 import android.net.Uri;
 import android.os.Vibrator;
-import android.util.Log;
 import android.widget.EditText;
 
 /**
@@ -209,41 +208,40 @@ public class Notification extends CordovaPlugin {
                 // First button
                 if (buttonLabels.length() > 0) {
                     try {
-						dlg.setNegativeButton(buttonLabels.getString(0),
-						        new AlertDialog.OnClickListener() {
-						            public void onClick(DialogInterface dialog, int which) {
-						                dialog.dismiss();
-						                callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
1));
-						            }
-						        });
-					} catch (JSONException e) { }
+                        dlg.setNegativeButton(buttonLabels.getString(0),
+                            new AlertDialog.OnClickListener() {
+                                public void onClick(DialogInterface dialog, int which) {
+                                    dialog.dismiss();
+                                    callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
1));
+                                }
+                            });
+                    } catch (JSONException e) { }
                 }
 
                 // Second button
                 if (buttonLabels.length() > 1) {
                     try {
-						dlg.setNeutralButton(buttonLabels.getString(1),
-						        new AlertDialog.OnClickListener() {
-						            public void onClick(DialogInterface dialog, int which) {
-						                dialog.dismiss();
-						                callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
2));
-						            }
-						        });
-					} catch (JSONException e) { }
+                        dlg.setNeutralButton(buttonLabels.getString(1),
+                            new AlertDialog.OnClickListener() {
+                                public void onClick(DialogInterface dialog, int which) {
+                                    dialog.dismiss();
+                                    callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
2));
+                                }
+                            });
+                    } catch (JSONException e) { }
                 }
 
                 // Third button
                 if (buttonLabels.length() > 2) {
                     try {
-						dlg.setPositiveButton(buttonLabels.getString(2),
-						        new AlertDialog.OnClickListener() {
-						            public void onClick(DialogInterface dialog, int which) {
-						                dialog.dismiss();
-						                callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
3));
-						            }
-						        }
-						        );
-					} catch (JSONException e) { }
+                        dlg.setPositiveButton(buttonLabels.getString(2),
+                            new AlertDialog.OnClickListener() {
+                                public void onClick(DialogInterface dialog, int which) {
+                                  dialog.dismiss();
+                                  callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
3));
+                                }
+                            });
+                    } catch (JSONException e) { }
                 }
                 dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
                     public void onCancel(DialogInterface dialog)
@@ -292,74 +290,72 @@ public class Notification extends CordovaPlugin {
                 // First button
                 if (buttonLabels.length() > 0) {
                     try {
-						dlg.setNegativeButton(buttonLabels.getString(0),
-						        new AlertDialog.OnClickListener() {
-						            public void onClick(DialogInterface dialog, int which) {
-						                dialog.dismiss();
-						                try {
-											result.put("buttonIndex",1);
-	                                        result.put("input1", promptInput.getText().toString().trim().length()==0
? defaultText : promptInput.getText());											
-										} catch (JSONException e) { e.printStackTrace(); }
-						                callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
result));
-						            }
-						        });
-					} catch (JSONException e) { }
+                        dlg.setNegativeButton(buttonLabels.getString(0),
+                            new AlertDialog.OnClickListener() {
+                                public void onClick(DialogInterface dialog, int which) {
+                                    dialog.dismiss();
+                                    try {
+                                        result.put("buttonIndex",1);
+                                        result.put("input1", promptInput.getText().toString().trim().length()==0
? defaultText : promptInput.getText());											
+                                    } catch (JSONException e) { e.printStackTrace(); }
+                                    callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
result));
+                                }
+                            });
+                    } catch (JSONException e) { }
                 }
 
                 // Second button
                 if (buttonLabels.length() > 1) {
                     try {
-						dlg.setNeutralButton(buttonLabels.getString(1),
-						        new AlertDialog.OnClickListener() {
-						            public void onClick(DialogInterface dialog, int which) {
-						                dialog.dismiss();
-						                try {
-											result.put("buttonIndex",2);
-											result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText
: promptInput.getText());
-										} catch (JSONException e) { e.printStackTrace(); }
-						                callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
result));
-						            }
-						        });
-					} catch (JSONException e) { }
+                        dlg.setNeutralButton(buttonLabels.getString(1),
+                            new AlertDialog.OnClickListener() {
+                                public void onClick(DialogInterface dialog, int which) {
+                                    dialog.dismiss();
+                                    try {
+                                        result.put("buttonIndex",2);
+                                        result.put("input1", promptInput.getText().toString().trim().length()==0
? defaultText : promptInput.getText());
+                                    } catch (JSONException e) { e.printStackTrace(); }
+                                    callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
result));
+                                }
+                            });
+                    } catch (JSONException e) { }
                 }
 
                 // Third button
                 if (buttonLabels.length() > 2) {
                     try {
-						dlg.setPositiveButton(buttonLabels.getString(2),
-						        new AlertDialog.OnClickListener() {
-						            public void onClick(DialogInterface dialog, int which) {
-						                dialog.dismiss();
-						                try {
-											result.put("buttonIndex",3);
-											result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText
: promptInput.getText());
-										} catch (JSONException e) { e.printStackTrace(); }
-						                callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
result));
-						            }
-						        }
-						        );
-					} catch (JSONException e) { }
+                        dlg.setPositiveButton(buttonLabels.getString(2),
+                            new AlertDialog.OnClickListener() {
+                                public void onClick(DialogInterface dialog, int which) {
+                                    dialog.dismiss();
+                                    try {
+                                        result.put("buttonIndex",3);
+                                        result.put("input1", promptInput.getText().toString().trim().length()==0
? defaultText : promptInput.getText());
+                                    } catch (JSONException e) { e.printStackTrace(); }
+                                    callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
result));
+                                }
+                            });
+                    } catch (JSONException e) { }
                 }
                 dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
-                    public void onCancel(DialogInterface dialog)
-                    {
+                    public void onCancel(DialogInterface dialog){
                         dialog.dismiss();
-		                try {
-							result.put("buttonIndex",0);
-							result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText
: promptInput.getText());
-						} catch (JSONException e) { e.printStackTrace(); }
-		                callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
result));
+                        try {
+                            result.put("buttonIndex",0);
+                            result.put("input1", promptInput.getText().toString().trim().length()==0
? defaultText : promptInput.getText());
+                        } catch (JSONException e) { e.printStackTrace(); }
+                        callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK,
result));
                     }
                 });
 
                 dlg.create();
                 dlg.show();
-                
+
             };
         };
-        this.cordova.getActivity().runOnUiThread(runnable);        
+        this.cordova.getActivity().runOnUiThread(runnable);
     }
-    
+
     /**
      * Show the spinner.
      *


Mime
View raw message