Fixed playback not working after activity resume.
This commit is contained in:
parent
002934b2a1
commit
7619bc174a
1 changed files with 4 additions and 2 deletions
|
@ -234,8 +234,10 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements
|
|||
@Override
|
||||
public void onRouteAdded(MediaRouter router, RouteInfo route) {
|
||||
for (int i = 0; i < mRouteAdapter.getCount(); i++) {
|
||||
if (mRouteAdapter.getItem(i).getId().equals(route.getId()))
|
||||
return;
|
||||
if (mRouteAdapter.getItem(i).getId().equals(route.getId())) {
|
||||
mRouteAdapter.remove(mRouteAdapter.getItem(i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
mRouteAdapter.add(route);
|
||||
}
|
||||
|
|
Reference in a new issue