Improve wifi-handling part one.

If a route is removed, the notification is also removed. This re-creates the notification
if the route is added again.
This commit is contained in:
Felix Ableitner 2014-05-04 13:42:08 +02:00
parent 6960fc0c18
commit 34137c051e

View file

@ -126,7 +126,16 @@ public class MediaRouterPlayService extends Service {
if (!mBound && !mPollingStatus)
stopSelf();
}
};
@Override
public void onRouteAdded(MediaRouter router, RouteInfo route) {
if (route.getId().equals(mCurrentRoute.getId())) {
selectRoute(route);
new CreateNotificationTask().execute(mPlaylist.get(mCurrentTrack)
.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class));
}
}
};
/**
* Creates a notification after the icon bitmap is loaded.