Commit d51a70a8 authored by Sébastien Toque's avatar Sébastien Toque
Browse files

start/stop thumbnailer in onResume/onPause.

onPause is called way more often than onStart, causing the thumbnailer to work only the first time.

see here for activity lifecycle : http://developer.android.com/reference/android/app/Activity.html
parent 09612e5b
......@@ -272,14 +272,6 @@ public class MainActivity extends SherlockFragmentActivity {
mMenu.setBehindOffset(Util.convertDpToPx(behindOffset_dp));
}
@Override
protected void onStart() {
/* Start the thumbnailer */
VideoListFragment f = (VideoListFragment)mSidebarAdapter.getFragment("video");
ThumbnailerManager.getInstance(this).start(f);
super.onStart();
}
@Override
protected void onResume() {
mAudioController.addAudioPlayer(mAudioPlayer);
......@@ -312,6 +304,11 @@ public class MainActivity extends SherlockFragmentActivity {
if (startFromNotification)
getIntent().removeExtra(AudioService.START_FROM_NOTIFICATION);
/* Start the thumbnailer */
VideoListFragment f = (VideoListFragment)mSidebarAdapter.getFragment("video");
ThumbnailerManager.getInstance(this).start(f);
super.onResume();
}
......
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