Commit 80aa15f4 authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Make sure all animations have ended before switching layouts

It is possible to make chrome switch layouts mid-animation. This
patch kills running animations in LayoutManager#startShowing to avoid
starting new animations in a bad state.

BUG=818017,820899

Change-Id: Ie591beedbf855a2ffd31baf849a334dd5230742b
Reviewed-on: https://chromium-review.googlesource.com/958333Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543135}
parent edcaa42b
......@@ -808,6 +808,7 @@ public class LayoutManager implements LayoutUpdateHost, LayoutProvider,
Layout oldLayout = getActiveLayout();
if (oldLayout != layout) {
if (oldLayout != null) {
oldLayout.forceAnimationToFinish();
oldLayout.detachViews();
}
layout.contextChanged(mHost.getContext());
......
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