Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
12f9c601
Commit
12f9c601
authored
Mar 31, 2015
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix context menu in directory browser
parent
09c43e0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
+2
-1
vlc-android/src/org/videolan/vlc/util/Util.java
vlc-android/src/org/videolan/vlc/util/Util.java
+3
-2
No files found.
vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
View file @
12f9c601
...
...
@@ -371,7 +371,8 @@ public class DirectoryAdapter extends BaseAdapter {
else
holder
.
icon
.
setImageResource
(
R
.
drawable
.
ic_menu_folder
);
holder
.
more
.
setVisibility
(
Util
.
canWrite
(
mCurrentDir
+
"/"
+
selectedNode
.
name
)
?
View
.
VISIBLE
:
View
.
INVISIBLE
);
holder
.
more
.
setVisibility
(
selectedNode
.
isFile
()
||
Util
.
canWrite
(
mCurrentDir
+
"/"
+
selectedNode
.
name
)
?
View
.
VISIBLE
:
View
.
INVISIBLE
);
holder
.
more
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
...
...
vlc-android/src/org/videolan/vlc/util/Util.java
View file @
12f9c601
...
...
@@ -310,8 +310,9 @@ public class Util {
public
static
boolean
canWrite
(
String
path
){
if
(
path
==
null
)
return
false
;
if
(
LibVlcUtil
.
isLolliPopOrLater
()
&&
!
path
.
startsWith
(
"file://"
+
Environment
.
getExternalStorageDirectory
().
getPath
()))
if
(
path
.
startsWith
(
Environment
.
getExternalStorageDirectory
().
getPath
()))
return
true
;
if
(
LibVlcUtil
.
isLolliPopOrLater
())
return
false
;
File
file
=
new
File
(
path
);
return
(
file
.
exists
()
&&
file
.
canWrite
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment