cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [4/4] git commit: removed vibration from android
Date Wed, 26 Jun 2013 22:20:10 GMT
removed vibration from android


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/339802db
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/339802db
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/339802db

Branch: refs/heads/master
Commit: 339802dba2a21257f50726ee95c9b469c314f19b
Parents: 66e99b9
Author: Steven Gill <stevengill97@gmail.com>
Authored: Wed Jun 26 15:20:05 2013 -0700
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Wed Jun 26 15:20:05 2013 -0700

----------------------------------------------------------------------
 src/android/Notification.java | 18 ------------------
 www/notification.js           |  9 ---------
 2 files changed, 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/339802db/src/android/Notification.java
----------------------------------------------------------------------
diff --git a/src/android/Notification.java b/src/android/Notification.java
index dd8bcd3..0006147 100755
--- a/src/android/Notification.java
+++ b/src/android/Notification.java
@@ -32,7 +32,6 @@ import android.content.DialogInterface;
 import android.media.Ringtone;
 import android.media.RingtoneManager;
 import android.net.Uri;
-import android.os.Vibrator;
 import android.widget.EditText;
 
 /**
@@ -62,9 +61,6 @@ public class Notification extends CordovaPlugin {
         if (action.equals("beep")) {
             this.beep(args.getLong(0));
         }
-        else if (action.equals("vibrate")) {
-            this.vibrate(args.getLong(0));
-        }
         else if (action.equals("alert")) {
             this.alert(args.getString(0), args.getString(1), args.getString(2), callbackContext);
             return true;
@@ -131,20 +127,6 @@ public class Notification extends CordovaPlugin {
     }
 
     /**
-     * Vibrates the device for the specified amount of time.
-     *
-     * @param time      Time to vibrate in ms.
-     */
-    public void vibrate(long time) {
-        // Start the vibration, 0 defaults to half a second.
-        if (time == 0) {
-            time = 500;
-        }
-        Vibrator vibrator = (Vibrator) this.cordova.getActivity().getSystemService(Context.VIBRATOR_SERVICE);
-        vibrator.vibrate(time);
-    }
-
-    /**
      * 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

http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/339802db/www/notification.js
----------------------------------------------------------------------
diff --git a/www/notification.js b/www/notification.js
index 47a1c52..c16c367 100644
--- a/www/notification.js
+++ b/www/notification.js
@@ -98,15 +98,6 @@ module.exports = {
     },
 
     /**
-     * Causes the device to vibrate.
-     *
-     * @param {Integer} mills       The number of milliseconds to vibrate for.
-     */
-    vibrate: function(mills) {
-        exec(null, null, "Notification", "vibrate", [mills]);
-    },
-
-    /**
      * Causes the device to beep.
      * On Android, the default notification ringtone is played "count" times.
      *


Mime
View raw message