1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 21:06:50 +01:00

Xiaomi: check for null values before encoding MusicSpec to proto

This commit is contained in:
MrYoranimo 2023-12-05 20:27:33 +01:00
parent 561dc16b28
commit 405596d960

View File

@ -136,8 +136,8 @@ public class XiaomiMusicService extends AbstractXiaomiService {
}
musicInfo.setVolume(mediaManager.getPhoneVolume())
.setTrack(musicSpec.track)
.setArtist(musicSpec.artist)
.setTrack(musicSpec.track != null ? musicSpec.track : "")
.setArtist(musicSpec.artist != null ? musicSpec.artist : "")
.setPosition(musicStateSpec.position)
.setDuration(musicSpec.duration);
}