Merge pull request #2068 from MeirSD/develop

Fix issue where mini player doesn't show up
This commit is contained in:
Martin Fietz 2016-07-20 23:04:49 +02:00 committed by GitHub
commit ef31878a10
1 changed files with 7 additions and 1 deletions

View File

@ -209,6 +209,8 @@ public class PlaybackService extends MediaBrowserServiceCompat {
private static volatile MediaType currentMediaType = MediaType.UNKNOWN;
private final IBinder mBinder = new LocalBinder();
public class LocalBinder extends Binder {
public PlaybackService getService() {
return PlaybackService.this;
@ -384,7 +386,11 @@ public class PlaybackService extends MediaBrowserServiceCompat {
@Override
public IBinder onBind(Intent intent) {
Log.d(TAG, "Received onBind event");
if(intent.getAction() != null && TextUtils.equals(intent.getAction(), MediaBrowserServiceCompat.SERVICE_INTERFACE)) {
return super.onBind(intent);
} else {
return mBinder;
}
}
@Override