2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

Show device name in MPRIS notification

This commit is contained in:
Nicolas Fella
2019-03-20 20:50:06 +00:00
parent fd5738aa99
commit d513a5305a

View File

@@ -326,7 +326,8 @@ public class MprisMediaSession implements SharedPreferences.OnSharedPreferenceCh
.setSmallIcon(R.drawable.ic_play_white) .setSmallIcon(R.drawable.ic_play_white)
.setShowWhen(false) .setShowWhen(false)
.setColor(service.getResources().getColor(R.color.primary)) .setColor(service.getResources().getColor(R.color.primary))
.setVisibility(androidx.core.app.NotificationCompat.VISIBILITY_PUBLIC); .setVisibility(androidx.core.app.NotificationCompat.VISIBILITY_PUBLIC)
.setSubText(service.getDevice(notificationDevice).getName());
if (!notificationPlayer.getTitle().isEmpty()) { if (!notificationPlayer.getTitle().isEmpty()) {
notification.setContentTitle(notificationPlayer.getTitle()); notification.setContentTitle(notificationPlayer.getTitle());