[Android] Hide delete option on ext storage with lollipoop
Geoffrey Métais
git at videolan.org
Thu Feb 19 15:46:20 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 19 15:32:58 2015 +0100| [c3490afd70ed1e8d6e53a91d629d147a9874cb73] | committer: Geoffrey Métais
Hide delete option on ext storage with lollipoop
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c3490afd70ed1e8d6e53a91d629d147a9874cb73
---
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 246f700..7c6571c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -30,6 +30,7 @@ import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
+import android.os.Environment;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.v4.app.FragmentActivity;
@@ -347,6 +348,8 @@ public class VideoGridFragment extends BrowserFragment implements ISortable, IVi
if (media.getMeta(Media.Meta.Title) != null)
hasInfo = true;
menu.findItem(R.id.video_list_info).setVisible(hasInfo);
+ menu.findItem(R.id.video_list_delete).setVisible(!LibVlcUtil.isLolliPopOrLater() ||
+ mediaWrapper.getLocation().startsWith("file://"+ Environment.getExternalStorageDirectory().getPath()));
}
@Override
More information about the Android
mailing list