uamp
uamp copied to clipboard
MediaBrowser.disconnect missing?
Hello,
I noticed that there's no call to MediaBrowserCompat.disconnect
anywhere in the repo.
Was this intentional? To never unbind the service? Or did you just forget?
I believe this is a bug and causes the MusicService to permanently leak until the app is killed. I was trying to see how the team handled certain tricky situations, but because the MusicService is never destroyed they never encountered them.
Per the docs, the client should "connect" during onStart() and "disconnect during onStop(). Without calling disconnect the app is leaking memory and resources well after the user has finished using the app.
https://developer.android.com/guide/topics/media-apps/audio-app/building-a-mediabrowser-client