Sanity check while updating volume in MediaRouteChooserDialog

Bug 6720224

When a window dies it's possible to receive a lingering ACTION_CANCEL
event to the SeekBar for volume. Be sure that we don't try to mess
with something that's already gone by that point.

Change-Id: I4f6119718fc21204d9013d591bc984b785b698b4
This commit is contained in:
Adam Powell
2012-06-22 20:41:31 -07:00
parent fd3fd482ab
commit 1b4ea7eff5

View File

@@ -122,6 +122,8 @@ public class MediaRouteChooserDialogFragment extends DialogFragment {
}
void updateVolume() {
if (mRouter == null) return;
final RouteInfo selectedRoute = mRouter.getSelectedRoute(mRouteTypes);
mVolumeIcon.setImageResource(
selectedRoute.getPlaybackType() == RouteInfo.PLAYBACK_TYPE_LOCAL ?