We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f56131b commit ac1ab17Copy full SHA for ac1ab17
app/src/main/java/org/schabi/newpipe/player/PlayerService.kt
@@ -177,7 +177,13 @@ class PlayerService : MediaBrowserServiceCompat() {
177
super.attachBaseContext(AudioServiceLeakFix.preventLeakOf(base))
178
}
179
180
- override fun onBind(intent: Intent): IBinder = mBinder
+ override fun onBind(intent: Intent): IBinder? {
181
+ if (SERVICE_INTERFACE == intent.action) {
182
+ // For actions related to the media browser service, pass the onBind to the superclass
183
+ return super.onBind(intent)
184
+ }
185
+ return mBinder
186
187
188
// MediaBrowserServiceCompat methods (they defer function calls to mediaBrowserConnector)
189
override fun onGetRoot(
0 commit comments