Fix binding issues by only using the MediaBrowserService onBind when the intent's action is MediaBrowserService and otherwise returning the LocalBinder.
This commit is contained in:
parent
b227c12f39
commit
ab9f21154d
|
@ -386,7 +386,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
|||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
Log.d(TAG, "Received onBind event");
|
||||
if(intent.getAction() != null && intent.getAction().equals("android.media.browse.MediaBrowserService")) {
|
||||
if(intent.getAction() != null && TextUtils.equals(intent.getAction(), MediaBrowserServiceCompat.SERVICE_INTERFACE)) {
|
||||
return super.onBind(intent);
|
||||
} else {
|
||||
return mBinder;
|
||||
|
|
Loading…
Reference in New Issue