Commit d24c331f authored by Matt Jones's avatar Matt Jones Committed by Commit Bot

Early exit if ScrimCoordinator#hideScrim called multiple times

Bug: 1135465
Change-Id: I3202884bcaaa9c80c6d6b3940da77c717f54b357
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2459108Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817665}
parent ad6842ad
...@@ -107,6 +107,10 @@ class ScrimMediator implements ScrimCoordinator.TouchEventDelegate { ...@@ -107,6 +107,10 @@ class ScrimMediator implements ScrimCoordinator.TouchEventDelegate {
*/ */
void hideScrim(boolean animate) { void hideScrim(boolean animate) {
assert mModel != null : "#hideScrim(...) was called on an inactive scrim!"; assert mModel != null : "#hideScrim(...) was called on an inactive scrim!";
if (mIsHidingOrHidden) {
if (mOverlayAnimator != null && !animate) mOverlayAnimator.end();
return;
}
if (mOverlayFadeOutAnimator == null) { if (mOverlayFadeOutAnimator == null) {
mOverlayFadeOutAnimator = ValueAnimator.ofFloat(1, 0); mOverlayFadeOutAnimator = ValueAnimator.ofFloat(1, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment