PlayerService: return appropriate IBinder depending on the action
This commit is contained in:
parent
9d750edf5f
commit
f6f7c377e2
|
@ -177,7 +177,13 @@ class PlayerService : MediaBrowserServiceCompat() {
|
||||||
super.attachBaseContext(AudioServiceLeakFix.preventLeakOf(base))
|
super.attachBaseContext(AudioServiceLeakFix.preventLeakOf(base))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBind(intent: Intent): IBinder = mBinder
|
override fun onBind(intent: Intent): IBinder? {
|
||||||
|
if (SERVICE_INTERFACE == intent.action) {
|
||||||
|
// For actions related to the media browser service, pass the onBind to the superclass
|
||||||
|
return super.onBind(intent)
|
||||||
|
}
|
||||||
|
return mBinder
|
||||||
|
}
|
||||||
|
|
||||||
// MediaBrowserServiceCompat methods (they defer function calls to mediaBrowserConnector)
|
// MediaBrowserServiceCompat methods (they defer function calls to mediaBrowserConnector)
|
||||||
override fun onGetRoot(
|
override fun onGetRoot(
|
||||||
|
|
Loading…
Reference in New Issue