Android 10 changes

This commit is contained in:
h4h13 2019-12-30 09:44:04 +05:30
parent 09c056f5ca
commit 1a10984307
5 changed files with 6 additions and 4 deletions

View file

@ -686,7 +686,7 @@ public class MusicService extends Service implements
.build());
}
private void updateMediaSessionMetaData() {
void updateMediaSessionMetaData() {
final Song song = getCurrentSong();
if (song.getId() == -1) {
@ -1047,7 +1047,6 @@ public class MusicService extends Service implements
try {
int newPosition = playback.seek(millis);
throttledSeekHandler.notifySeek();
updateMediaSessionPlaybackState();
return newPosition;
} catch (Exception e) {
return -1;

View file

@ -25,6 +25,8 @@ class ThrottledSeekHandler(
) : Runnable {
fun notifySeek() {
musicService.updateMediaSessionPlaybackState()
musicService.updateMediaSessionMetaData()
handler.removeCallbacks(this)
handler.postDelayed(this, THROTTLE)
}