Fixed crash when route is added.
This commit is contained in:
parent
263028c42a
commit
44064c25de
1 changed files with 4 additions and 2 deletions
|
@ -133,10 +133,12 @@ public class MediaRouterPlayService extends Service {
|
||||||
public void onRouteAdded(MediaRouter router, RouteInfo route) {
|
public void onRouteAdded(MediaRouter router, RouteInfo route) {
|
||||||
if (route.getId().equals(mCurrentRoute.getId())) {
|
if (route.getId().equals(mCurrentRoute.getId())) {
|
||||||
selectRoute(route);
|
selectRoute(route);
|
||||||
|
if (mCurrentTrack >= 0 && mCurrentTrack < mPlaylist.size()) {
|
||||||
new CreateNotificationTask().execute(mPlaylist.get(mCurrentTrack)
|
new CreateNotificationTask().execute(mPlaylist.get(mCurrentTrack)
|
||||||
.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class));
|
.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in a new issue