Null-check tooltip view to avoid race condition crash.
I think this happens if you tap the tooltip just as the dialog times out? Can't hurt to check. Fixes: 191281724 Test: crashes at least as infrequently as before, probably less Change-Id: I3c83e775a7fd278dc255242518412ba790625fdb
This commit is contained in:
@@ -1127,7 +1127,12 @@ public class VolumeDialogImpl implements VolumeDialog,
|
||||
.alpha(0.f)
|
||||
.setStartDelay(0)
|
||||
.setDuration(mDialogHideAnimationDurationMs)
|
||||
.withEndAction(() -> mODICaptionsTooltipView.setVisibility(INVISIBLE))
|
||||
.withEndAction(() -> {
|
||||
// It might have been nulled out by tryToRemoveCaptionsTooltip.
|
||||
if (mODICaptionsTooltipView != null) {
|
||||
mODICaptionsTooltipView.setVisibility(INVISIBLE);
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user