Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A6B1D834 for ; Fri, 31 Aug 2012 16:50:46 +0000 (UTC) Received: (qmail 70534 invoked by uid 500); 31 Aug 2012 16:50:45 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 70480 invoked by uid 500); 31 Aug 2012 16:50:45 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 70465 invoked by uid 99); 31 Aug 2012 16:50:45 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2012 16:50:45 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9D6E322CDC; Fri, 31 Aug 2012 16:50:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: macdonst@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/2] android commit: CB-1358: Getting Force Close in incoming Cal while recording the Audio? Message-Id: <20120831165045.9D6E322CDC@tyr.zones.apache.org> Date: Fri, 31 Aug 2012 16:50:45 +0000 (UTC) CB-1358: Getting Force Close in incoming Cal while recording the Audio? 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/4d5e452e Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/4d5e452e Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/4d5e452e Branch: refs/heads/master Commit: 4d5e452ecedcc7b0ab756ce3ffd2c2aeaead71e7 Parents: 1ba3ecb Author: Simon MacDonald Authored: Fri Aug 31 12:45:01 2012 -0400 Committer: Simon MacDonald Committed: Fri Aug 31 12:45:01 2012 -0400 ---------------------------------------------------------------------- framework/src/org/apache/cordova/AudioPlayer.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/4d5e452e/framework/src/org/apache/cordova/AudioPlayer.java ---------------------------------------------------------------------- diff --git a/framework/src/org/apache/cordova/AudioPlayer.java b/framework/src/org/apache/cordova/AudioPlayer.java index 90e0e16..3716012 100644 --- a/framework/src/org/apache/cordova/AudioPlayer.java +++ b/framework/src/org/apache/cordova/AudioPlayer.java @@ -207,7 +207,7 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On * @param file The name of the audio file. */ public void startPlaying(String file) { - if (this.readyPlayer(file)) { + if (this.readyPlayer(file) && this.player != null) { this.player.start(); this.setState(STATE.MEDIA_RUNNING); this.seekOnPrepared = 0; //insures this is always reset @@ -236,7 +236,7 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On public void pausePlaying() { // If playing, then pause - if (this.state == STATE.MEDIA_RUNNING) { + if (this.state == STATE.MEDIA_RUNNING && this.player != null) { this.player.pause(); this.setState(STATE.MEDIA_PAUSED); }