Merge "Null-check tooltip view to avoid race condition crash." into sc-dev

This commit is contained in:
Josh Tsuji
2021-06-28 17:09:49 +00:00
committed by Android (Google) Code Review

View File

@@ -1127,7 +1127,12 @@ public class VolumeDialogImpl implements VolumeDialog,
.alpha(0.f) .alpha(0.f)
.setStartDelay(0) .setStartDelay(0)
.setDuration(mDialogHideAnimationDurationMs) .setDuration(mDialogHideAnimationDurationMs)
.withEndAction(() -> mODICaptionsTooltipView.setVisibility(INVISIBLE)) .withEndAction(() -> {
// It might have been nulled out by tryToRemoveCaptionsTooltip.
if (mODICaptionsTooltipView != null) {
mODICaptionsTooltipView.setVisibility(INVISIBLE);
}
})
.start(); .start();
} }
} }