Avoid crash if empty is label (no genre)

This commit is contained in:
Adrian Ulrich 2018-10-27 11:18:34 +02:00
parent 7c9731e05b
commit 2afbfcb90f

View File

@ -46,6 +46,11 @@ public class SystemUtils {
shortcut.putExtra(LibraryAdapter.DATA_TYPE, type);
shortcut.putExtra(LibraryAdapter.DATA_ID, id);
if (label.length() == 0) {
// Android does not allow empty labels.
label = "?";
}
Bitmap cover = null;
Song song = MediaUtils.getSongByTypeId(context, type, id);
if (song != null) {