You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/09/09 21:33:47 UTC

[1/2] git commit: [CB-4763] Remove reference to cordova-android's FileHelper.

Updated Branches:
  refs/heads/dev 883f4c602 -> 653c2fbc9


[CB-4763] Remove reference to cordova-android's FileHelper.


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/7d62099d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/7d62099d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/7d62099d

Branch: refs/heads/dev
Commit: 7d62099d7b26f18cb9ba1ec4843bb4032092af33
Parents: 883f4c6
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Sep 9 15:06:11 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Sep 9 15:06:11 2013 -0400

----------------------------------------------------------------------
 plugin.xml                    |  1 +
 src/android/AudioHandler.java |  1 -
 src/android/FileHelper.java   | 38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/7d62099d/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 61d1c9e..2a2552e 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -33,6 +33,7 @@ id="org.apache.cordova.core.AudioHandler"
         
         <source-file src="src/android/AudioHandler.java" target-dir="src/org/apache/cordova/media" />
         <source-file src="src/android/AudioPlayer.java" target-dir="src/org/apache/cordova/media" />
+        <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/media" />
      </platform>
      
      <!-- ios -->

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/7d62099d/src/android/AudioHandler.java
----------------------------------------------------------------------
diff --git a/src/android/AudioHandler.java b/src/android/AudioHandler.java
index 7872a66..63d8580 100644
--- a/src/android/AudioHandler.java
+++ b/src/android/AudioHandler.java
@@ -18,7 +18,6 @@
 */
 package org.apache.cordova.media;
 
-import org.apache.cordova.FileHelper;
 import org.apache.cordova.CallbackContext;
 import org.apache.cordova.CordovaPlugin;
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/7d62099d/src/android/FileHelper.java
----------------------------------------------------------------------
diff --git a/src/android/FileHelper.java b/src/android/FileHelper.java
new file mode 100644
index 0000000..e20752c
--- /dev/null
+++ b/src/android/FileHelper.java
@@ -0,0 +1,38 @@
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+ */
+package org.apache.cordova.media;
+
+import android.net.Uri;
+
+public class FileHelper {
+
+    /**
+     * Removes the "file://" prefix from the given URI string, if applicable.
+     * If the given URI string doesn't have a "file://" prefix, it is returned unchanged.
+     *
+     * @param uriString the URI string to operate on
+     * @return a path without the "file://" prefix
+     */
+    public static String stripFileProtocol(String uriString) {
+        if (uriString.startsWith("file://")) {
+            return Uri.parse(uriString).getPath();
+        }
+        return uriString;
+    }
+}


[2/2] git commit: Rename plugin id from AudioHandler -> media

Posted by ag...@apache.org.
Rename plugin id from AudioHandler -> media


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/653c2fbc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/653c2fbc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/653c2fbc

Branch: refs/heads/dev
Commit: 653c2fbc9291f84558e2e734c8f5de24b6ac4d58
Parents: 7d62099
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Sep 9 15:19:56 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Sep 9 15:19:56 2013 -0400

----------------------------------------------------------------------
 plugin.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/653c2fbc/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 2a2552e..0614b65 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -2,7 +2,7 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
 xmlns:android="http://schemas.android.com/apk/res/android"
-id="org.apache.cordova.core.AudioHandler"
+id="org.apache.cordova.core.media"
     version="0.2.2-dev">
     <name>Media</name>
     <description>Cordova Media Plugin</description>