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:
@@ -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 ?
|
||||
|
||||
Reference in New Issue
Block a user