Skip to content

Commit 1b4ea7e

Browse files
committed
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
1 parent fd3fd48 commit 1b4ea7e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/java/com/android/internal/app/MediaRouteChooserDialogFragment.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ public void setRouteTypes(int types) {
122122
}
123123

124124
void updateVolume() {
125+
if (mRouter == null) return;
126+
125127
final RouteInfo selectedRoute = mRouter.getSelectedRoute(mRouteTypes);
126128
mVolumeIcon.setImageResource(
127129
selectedRoute.getPlaybackType() == RouteInfo.PLAYBACK_TYPE_LOCAL ?

0 commit comments

Comments
 (0)