[Android] Start ML only if storage permission is granted
Geoffrey Métais
git at videolan.org
Wed Oct 4 10:53:26 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Oct 4 10:48:49 2017 +0200| [6a64fdd36c4e8e4df7ca5bf0b0bece3259d4692f] | committer: Geoffrey Métais
Start ML only if storage permission is granted
> https://code.videolan.org/videolan/vlc-android/commit/6a64fdd36c4e8e4df7ca5bf0b0bece3259d4692f
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 837c32e46..bcbb24839 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -303,6 +303,8 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
MedialibraryReceiver mLibraryReceiver = null;
private void registerMedialibrary(final Runnable action) {
+ if (!Permissions.canReadStorage())
+ return;
final LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
if (mLibraryReceiver == null) {
mLibraryReceiver = new MedialibraryReceiver();
More information about the Android
mailing list