Commit 8d63c679 authored by Geoffrey Métais's avatar Geoffrey Métais

Command UI update in events listener

(cherry picked from commit c4ad53aa)
parent fd0042ce
......@@ -605,6 +605,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
executeUpdate();
publishState(event.type);
executeUpdateProgress();
mHandler.sendEmptyMessage(SHOW_PROGRESS);
final MediaWrapper mw = mMediaList.getMedia(mCurrentIndex);
if (mw != null) {
......@@ -639,6 +640,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
publishState(event.type);
executeUpdateProgress();
showNotification();
mHandler.removeMessages(SHOW_PROGRESS);
if (mWakeLock.isHeld())
mWakeLock.release();
break;
......@@ -952,22 +954,14 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
public void pause() {
if (mPausable) {
savePosition();
mHandler.removeMessages(SHOW_PROGRESS);
// hideNotification(); <-- see event handler
mMediaPlayer.pause();
broadcastMetadata();
}
}
@MainThread
public void play() {
if(hasCurrentMedia()) {
if (hasCurrentMedia())
mMediaPlayer.play();
mHandler.sendEmptyMessage(SHOW_PROGRESS);
updateMetadata();
updateWidget();
broadcastMetadata();
}
}
@MainThread
......
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