[Android] Util: remove useless use of instance

Edward Wang git at videolan.org
Mon Jan 28 16:20:50 CET 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Mon Jan 28 10:20:35 2013 -0500| [de6826e6f3b63a6a6337aff8f80f17b96fae56bc] | committer: Edward Wang

Util: remove useless use of instance

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=de6826e6f3b63a6a6337aff8f80f17b96fae56bc
---

 vlc-android/src/org/videolan/vlc/LibVLC.java |    2 +-
 vlc-android/src/org/videolan/vlc/Util.java   |    8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/LibVLC.java b/vlc-android/src/org/videolan/vlc/LibVLC.java
index ac4adc3..e89caf1 100644
--- a/vlc-android/src/org/videolan/vlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/vlc/LibVLC.java
@@ -477,7 +477,7 @@ public class LibVLC {
 
     public native int getSpuTracksCount();
 
-    public native String nativeToURI(String path);
+    public static native String nativeToURI(String path);
 
     public static native void nativeReadDirectory(String path, ArrayList<String> res);
 
diff --git a/vlc-android/src/org/videolan/vlc/Util.java b/vlc-android/src/org/videolan/vlc/Util.java
index 0e1df63..d5b6aa5 100644
--- a/vlc-android/src/org/videolan/vlc/Util.java
+++ b/vlc-android/src/org/videolan/vlc/Util.java
@@ -83,13 +83,7 @@ public class Util {
     }
 
     public static String PathToURI(String path) {
-        String URI;
-        try {
-            URI = LibVLC.getInstance().nativeToURI(path);
-        } catch (LibVlcException e) {
-            URI = "";
-        }
-        return URI;
+        return LibVLC.nativeToURI(path);
     }
 
     public static String stripTrailingSlash(String s) {



More information about the Android mailing list