Commit 18548fb6 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Added missing "unregister"

parent 7799f7e8
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment