Commit c3490afd authored by Geoffrey Métais's avatar Geoffrey Métais

Hide delete option on ext storage with lollipoop

parent 0604f3fe
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment