[Android] VideoPlayer: use mUri for file picker

Thomas Guillem git at videolan.org
Tue Jun 30 10:44:17 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jun 30 10:43:43 2015 +0200| [3e8e9530e6d50136276d69e070c41892d0464570] | committer: Thomas Guillem

VideoPlayer: use mUri for file picker

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

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java      |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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 dcde299..b2c1c4b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2005,9 +2005,11 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                     selectSubtitles();
                     return true;
                 } else if (item.getItemId() == R.id.video_menu_subtitles_picker) {
+                    if (mUri == null)
+                        return false;
                     Intent filePickerIntent = new Intent(context, FilePickerActivity.class);
-                    if (TextUtils.equals(MediaPlayer().getMedia().getUri().getScheme(), "file"))
-                        filePickerIntent.setData(Uri.parse(Strings.getParent(MediaPlayer().getMedia().getUri().toString())));
+                    if (TextUtils.equals(mUri.getScheme(), "file"))
+                        filePickerIntent.setData(Uri.parse(Strings.getParent(mUri.toString())));
                     context.startActivityForResult(filePickerIntent, 0);
                     return true;
                 }



More information about the Android mailing list