[Android] Hide delete option on ext storage with lollipoop

Geoffrey Métais git at videolan.org
Mon Feb 23 10:56:25 CET 2015


vlc-ports/android | branch: 1.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 19 15:32:58 2015 +0100| [4c37221e60d93f1ed300cd5508b7d0d5a09fd645] | committer: Geoffrey Métais

Hide delete option on ext storage with lollipoop

(cherry picked from commit c3490afd70ed1e8d6e53a91d629d147a9874cb73)

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

 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 22a4b36..d382986 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -52,6 +52,7 @@ import android.content.IntentFilter;
 import android.content.res.Configuration;
 import android.os.Build;
 import android.os.Bundle;
+import android.os.Environment;
 import android.os.Handler;
 import android.os.Message;
 import android.support.v4.app.FragmentActivity;
@@ -344,6 +345,8 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
             MenuItem playFromStart = menu.findItem(R.id.video_list_play_from_start);
             playFromStart.setVisible(true);
         }
+        menu.findItem(R.id.video_list_delete).setVisible(!LibVlcUtil.isLolliPopOrLater() ||
+                media.getLocation().startsWith("file://"+ Environment.getExternalStorageDirectory().getPath()));
     }
 
     @Override



More information about the Android mailing list