Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
319
Issues
319
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLC-Android
Commits
4f2f4262
Commit
4f2f4262
authored
Mar 20, 2017
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove instanceof call in image loader
parent
d9522e27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
...id/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
+7
-5
No files found.
vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java
View file @
4f2f4262
...
...
@@ -94,15 +94,17 @@ public class AsyncImageLoader {
return
;
}
if
(
item
.
getItemType
()
==
MediaLibraryItem
.
TYPE_MEDIA
)
{
if
(
item
instanceof
MediaGroup
)
item
=
((
MediaGroup
)
item
).
getFirstMedia
();
int
type
=
((
MediaWrapper
)
item
).
getType
();
MediaWrapper
mw
=
(
MediaWrapper
)
item
;
if
(
mw
.
getType
()
==
MediaWrapper
.
TYPE_GROUP
)
mw
=
((
MediaGroup
)
mw
).
getFirstMedia
();
int
type
=
mw
.
getType
();
boolean
isMedia
=
type
==
MediaWrapper
.
TYPE_AUDIO
||
type
==
MediaWrapper
.
TYPE_VIDEO
;
Uri
uri
=
((
MediaWrapper
)
item
)
.
getUri
();
Uri
uri
=
mw
.
getUri
();
if
(!
isMedia
&&
!(
type
==
MediaWrapper
.
TYPE_DIR
&&
"upnp"
.
equals
(
uri
.
getScheme
())))
return
;
item
=
mw
;
if
(
item
.
getId
()
==
0L
&&
(
isMedia
)
&&
"file"
.
equals
(
uri
.
getScheme
()))
{
MediaWrapper
mw
=
VLCApplication
.
getMLInstance
().
getMedia
(
uri
);
mw
=
VLCApplication
.
getMLInstance
().
getMedia
(
uri
);
if
(
mw
!=
null
)
item
=
mw
;
}
...
...
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