You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/09/27 00:27:14 UTC
[05/15] git commit: Fix compiler/lint warnings
Fix compiler/lint warnings
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/0c42600b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/0c42600b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/0c42600b
Branch: refs/heads/master
Commit: 0c42600b9654f307e822c77ef1f041589f8632d7
Parents: 653c2fb
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Sep 9 16:22:49 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Sep 9 16:22:49 2013 -0400
----------------------------------------------------------------------
src/android/AudioPlayer.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/0c42600b/src/android/AudioPlayer.java
----------------------------------------------------------------------
diff --git a/src/android/AudioPlayer.java b/src/android/AudioPlayer.java
index 49b0e6f..513d5ff 100644
--- a/src/android/AudioPlayer.java
+++ b/src/android/AudioPlayer.java
@@ -65,9 +65,9 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On
// Media error codes
private static int MEDIA_ERR_NONE_ACTIVE = 0;
private static int MEDIA_ERR_ABORTED = 1;
- private static int MEDIA_ERR_NETWORK = 2;
- private static int MEDIA_ERR_DECODE = 3;
- private static int MEDIA_ERR_NONE_SUPPORTED = 4;
+// private static int MEDIA_ERR_NETWORK = 2;
+// private static int MEDIA_ERR_DECODE = 3;
+// private static int MEDIA_ERR_NONE_SUPPORTED = 4;
private AudioHandler handler; // The AudioHandler object
private String id; // The id of this player (used to identify Media object in JavaScript)
@@ -541,7 +541,7 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener, On
fileInputStream.close();
}
else {
- this.player.setDataSource("/sdcard/" + file);
+ this.player.setDataSource(Environment.getExternalStorageDirectory().getPath() + "/" + file);
}
}
this.setState(STATE.MEDIA_STARTING);