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:
Meir Schwarz 2016-07-02 01:13:27 -07:00
parent b227c12f39
commit ab9f21154d
1 changed files with 1 additions and 1 deletions

View File

@ -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;