[Android] Don't crash if the location contains non-UTF8 characters

Ludovic Fauvet git at videolan.org
Fri May 17 18:20:18 CEST 2013


vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Fri May 17 17:50:19 2013 +0200| [67a5d28ee74fd699a88700e4a28d6dba240dde77] | committer: Ludovic Fauvet

Don't crash if the location contains non-UTF8 characters

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java |    1 +
 1 file changed, 1 insertion(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 35187dd..b5857f4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1431,6 +1431,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
             try {
                 title = URLDecoder.decode(mLocation, "UTF-8");
             } catch (UnsupportedEncodingException e) {
+            } catch (IllegalArgumentException e) {
             }
             if (title.startsWith("file:")) {
                 title = new File(title).getName();



More information about the Android mailing list