Merge "Null-check tooltip view to avoid race condition crash." into sc-dev am: 262d5493ed am: 5618718353

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15128610

Change-Id: I9c06eaacf46772ba0ddeef7b7a7f473f119328eb
This commit is contained in:
Josh Tsuji
2021-06-28 17:41:53 +00:00
committed by Automerger Merge Worker

View File

@@ -1134,7 +1134,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();
}
}