From 762854ad7adb7fe53d1fc63282f2742862a6ab4a Mon Sep 17 00:00:00 2001 From: Lorin Beer Date: Thu, 28 Jun 2012 15:53:47 -0700 Subject: [PATCH] changed handling of stopRecording to reflect handling of create message --- framework/src/org/apache/cordova/AudioHandler.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/framework/src/org/apache/cordova/AudioHandler.java b/framework/src/org/apache/cordova/AudioHandler.java index 7b42959d..c4e3063f 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); } /**