Merge branch 'master' of https://github.com/bkrodgers/Subsonic-Android-archrival
This commit is contained in:
commit
edd5fdb5a5
|
@ -800,6 +800,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
|
|||
remoteControlClientCompat
|
||||
.editMetadata(true)
|
||||
.putString(MediaMetadataRetriever.METADATA_KEY_TITLE, title)
|
||||
.putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, currentSong.getArtist())
|
||||
.putString(MediaMetadataRetriever.METADATA_KEY_ALBUM, album)
|
||||
.putLong(MediaMetadataRetriever.METADATA_KEY_DURATION, duration)
|
||||
.putBitmap(RemoteControlClientCompat.MetadataEditorCompat.METADATA_KEY_ARTWORK, bitmap)
|
||||
|
@ -875,7 +876,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
|
|||
mp.start();
|
||||
setPlayerState(STARTED);
|
||||
} else {
|
||||
setPlayerState(PAUSED);
|
||||
setPlayerState(STOPPED);
|
||||
}
|
||||
|
||||
lifecycleSupport.serializeDownloadQueue();
|
||||
|
|
|
@ -200,6 +200,8 @@ public class DownloadServiceLifecycleSupport {
|
|||
|
||||
// Work-around: Serialize again, as the restore() method creates a serialization without current playing info.
|
||||
serializeDownloadQueue();
|
||||
|
||||
downloadService.setPlayerState(PlayerState.STOPPED);
|
||||
}
|
||||
|
||||
private void handleKeyEvent(KeyEvent event) {
|
||||
|
@ -209,6 +211,8 @@ public class DownloadServiceLifecycleSupport {
|
|||
|
||||
switch (event.getKeyCode()) {
|
||||
case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
|
||||
case KeyEvent.KEYCODE_MEDIA_PLAY:
|
||||
case KeyEvent.KEYCODE_MEDIA_PAUSE:
|
||||
case KeyEvent.KEYCODE_HEADSETHOOK:
|
||||
downloadService.togglePlayPause();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue