mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 13:47:41 +00:00
Added missing "unregister"
This commit is contained in:
parent
7799f7e817
commit
18548fb6df
@ -79,6 +79,15 @@ public class MprisReceiverPlugin extends Plugin implements MediaSessionManager.O
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
MediaSessionManager manager = (MediaSessionManager) context.getSystemService(Context.MEDIA_SESSION_SERVICE);
|
||||
if (manager != null) {
|
||||
manager.removeOnActiveSessionsChangedListener(MprisReceiverPlugin.this);
|
||||
}
|
||||
}
|
||||
|
||||
private void createPlayers(List<MediaController> sessions) {
|
||||
for (MediaController controller : sessions) {
|
||||
createPlayer(controller);
|
||||
|
Loading…
x
Reference in New Issue
Block a user