incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [5/14] android commit: changed handling of stopRecording to reflect handling of create message
Date Thu, 12 Jul 2012 21:44:09 GMT
changed handling of stopRecording to reflect handling of create message


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/762854ad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/762854ad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/762854ad

Branch: refs/heads/master
Commit: 762854ad7adb7fe53d1fc63282f2742862a6ab4a
Parents: 1046506
Author: Lorin Beer <lorin.beer@nitobi.com>
Authored: Thu Jun 28 15:53:47 2012 -0700
Committer: Lorin Beer <lorin.beer@nitobi.com>
Committed: Thu Jun 28 15:53:47 2012 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/AudioHandler.java |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/762854ad/framework/src/org/apache/cordova/AudioHandler.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/AudioHandler.java b/framework/src/org/apache/cordova/AudioHandler.java
index 7b42959..c4e3063 100644
--- a/framework/src/org/apache/cordova/AudioHandler.java
+++ b/framework/src/org/apache/cordova/AudioHandler.java
@@ -198,13 +198,12 @@ public class AudioHandler extends Plugin {
      * @param file				The name of the file
      */
     public void startRecordingAudio(String id, String file) {
-        // If already recording, then just return;
-        if (this.players.containsKey(id)) {
-            return;
-        }
-        AudioPlayer audio = new AudioPlayer(this, id, file);
-        this.players.put(id, audio);
-        audio.startRecording(file);
+    	AudioPlayer audio = this.players.get(id);
+    	if ( audio == null) {
+    	    audio = new AudioPlayer(this, id, file);
+            this.players.put(id, audio);
+    	}
+    	audio.startRecording(file);
     }
 
     /**


Mime
View raw message