Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-Android
Commits
d7babc50
Commit
d7babc50
authored
Jul 06, 2014
by
Jean-Baptiste Kempf
Browse files
Remove Context passing for MediaLibrary.loadMediaItems()
parent
9f804c8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
vlc-android/src/org/videolan/vlc/MediaLibrary.java
View file @
d7babc50
...
...
@@ -74,11 +74,11 @@ public class MediaLibrary {
isStopping
=
true
;
mRestartContext
=
context
;
}
else
{
loadMediaItems
(
context
);
loadMediaItems
();
}
}
public
void
loadMediaItems
(
Context
context
)
{
public
void
loadMediaItems
()
{
if
(
mLoadingThread
==
null
||
mLoadingThread
.
getState
()
==
State
.
TERMINATED
)
{
isStopping
=
false
;
VideoGridFragment
.
actionScanStart
();
...
...
@@ -379,7 +379,7 @@ public class MediaLibrary {
MediaLibrary
owner
=
getOwner
();
if
(
owner
==
null
)
return
;
if
(
owner
.
mRestartContext
!=
null
)
owner
.
loadMediaItems
(
owner
.
mRestartContext
);
owner
.
loadMediaItems
();
else
Log
.
e
(
TAG
,
"Context lost in a black hole"
);
}
...
...
vlc-android/src/org/videolan/vlc/gui/MainActivity.java
View file @
d7babc50
...
...
@@ -331,7 +331,7 @@ public class MainActivity extends ActionBarActivity {
/* Load media items from database and storage */
if
(
mScanNeeded
)
MediaLibrary
.
getInstance
(
this
).
loadMediaItems
(
this
);
MediaLibrary
.
getInstance
(
this
).
loadMediaItems
();
}
@Override
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment