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:
parent
6960fc0c18
commit
34137c051e
1 changed files with 10 additions and 1 deletions
|
@ -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.
|
||||
|
|
Reference in a new issue