mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +00:00
Unbreak Mpris media notifications
Because notificationDevice is only set on updateCurrentPlayer(), we ought to call it before checking if the device is null.
This commit is contained in:
@@ -264,15 +264,15 @@ public class MprisMediaSession implements
|
||||
return;
|
||||
}
|
||||
|
||||
//Make sure our information is up-to-date
|
||||
MprisPlugin.MprisPlayer currentPlayer = updateCurrentPlayer();
|
||||
|
||||
Device device = KdeConnect.getInstance().getDevice(notificationDevice);
|
||||
if (device == null) {
|
||||
closeMediaNotification();
|
||||
return;
|
||||
}
|
||||
|
||||
//Make sure our information is up-to-date
|
||||
MprisPlugin.MprisPlayer currentPlayer = updateCurrentPlayer();
|
||||
|
||||
//If the player disappeared (and no other playing one found), just remove the notification
|
||||
if (currentPlayer == null) {
|
||||
closeMediaNotification();
|
||||
|
Reference in New Issue
Block a user