Fixed play notification to show playlist on click.

This commit is contained in:
Felix Ableitner 2014-02-09 20:00:56 +01:00
parent 2314e895d1
commit b804cef68a

View file

@ -97,8 +97,6 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements
private boolean mPlaying; private boolean mPlaying;
private boolean mRestorePlaylistMode;
private RouteAdapter mRouteAdapter; private RouteAdapter mRouteAdapter;
private FileArrayAdapter mPlaylistAdapter; private FileArrayAdapter mPlaylistAdapter;
@ -126,8 +124,9 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements
mPlaylistAdapter.add(mMediaRouterPlayService.getService().getPlaylist()); mPlaylistAdapter.add(mMediaRouterPlayService.getService().getPlaylist());
receiveIsPlaying(mMediaRouterPlayService.getService().getCurrentTrack()); receiveIsPlaying(mMediaRouterPlayService.getService().getCurrentTrack());
applyColors(); applyColors();
if (mRestorePlaylistMode) RouteInfo currentRoute = mMediaRouterPlayService.getService().getCurrentRoute();
playlistMode(mMediaRouterPlayService.getService().getCurrentRoute()); if (currentRoute != null)
playlistMode(currentRoute);
} }
public void onServiceDisconnected(ComponentName className) { public void onServiceDisconnected(ComponentName className) {
@ -205,10 +204,8 @@ public class RouteFragment extends MediaRouteDiscoveryFragment implements
Context.BIND_AUTO_CREATE Context.BIND_AUTO_CREATE
); );
if (savedInstanceState != null) { if (savedInstanceState != null)
mListView.onRestoreInstanceState(savedInstanceState.getParcelable("list_state")); mListView.onRestoreInstanceState(savedInstanceState.getParcelable("list_state"));
mRestorePlaylistMode = savedInstanceState.getBoolean("route_selected");
}
} }
@Override @Override