Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
532
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
39b6afc3
You need to sign in or sign up before continuing.
Commit
39b6afc3
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Prevent NPE in browsers context menu
parent
67793366
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+2
-0
2 additions, 0 deletions
...src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
with
2 additions
and
0 deletions
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+
2
−
0
View file @
39b6afc3
...
...
@@ -503,6 +503,7 @@ public abstract class BaseBrowserFragment extends SortableFragment<BaseBrowserAd
@Override
protected
void
inflate
(
Menu
menu
,
int
position
)
{
MediaWrapper
mw
=
(
MediaWrapper
)
mAdapter
.
getItem
(
position
);
if
(
mw
==
null
)
return
;
int
type
=
mw
.
getType
();
MenuInflater
inflater
=
getActivity
().
getMenuInflater
();
inflater
.
inflate
(
type
==
MediaWrapper
.
TYPE_DIR
?
R
.
menu
.
directory_view_dir
:
R
.
menu
.
directory_view_file
,
menu
);
...
...
@@ -510,6 +511,7 @@ public abstract class BaseBrowserFragment extends SortableFragment<BaseBrowserAd
protected
void
setContextMenuItems
(
Menu
menu
,
int
position
)
{
final
MediaWrapper
mw
=
(
MediaWrapper
)
mAdapter
.
getItem
(
position
);
if
(
mw
==
null
)
return
;
final
int
type
=
mw
.
getType
();
boolean
canWrite
=
this
instanceof
FileBrowserFragment
&&
FileUtils
.
canWrite
(
mw
.
getUri
().
getPath
());
if
(
type
==
MediaWrapper
.
TYPE_DIR
)
{
...
...
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
98abc923
·
7 years ago
mentioned in commit
98abc923
mentioned in commit 98abc923d4e41333e0f2bc832a01131c231b53e0
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment