Improve wifi handling part two.

If a route is removed, RouteFragment goes into deviceListMode. This change
makes it go back into playlistMode if the route set in MediaRouterPlayService
is added again.
This commit is contained in:
Felix Ableitner 2014-05-04 13:54:33 +02:00
parent 34137c051e
commit 9bc05b12f5

View file

@ -244,6 +244,10 @@ OnSeekBarChangeListener, OnScrollListener {
break; break;
} }
mRouteAdapter.add(route); mRouteAdapter.add(route);
RouteInfo current = mMediaRouterPlayService.getCurrentRoute();
if (current != null && route.getId().equals(current.getId()))
playlistMode(current);
} }
@Override @Override
@ -512,7 +516,7 @@ OnSeekBarChangeListener, OnScrollListener {
changePlayPauseState(true); changePlayPauseState(true);
} else { } else {
Toast.makeText(getActivity(), R.string.select_route, Toast.LENGTH_SHORT) Toast.makeText(getActivity(), R.string.select_route, Toast.LENGTH_SHORT)
.show(); .show();
mStartPlayingOnSelect = start; mStartPlayingOnSelect = start;
} }
} }