Commit 9abcf9a2 authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Fix tab switcher bottom toolbar animations

This patch only propagates swipe end and fling events to the toolbar
swipe layout if it is showing. Previously all touch events to interact
with the modified swipe handler would be processed regargless of which
layout was showing. The result was incorrect events being triggered
and, in this case, showing incorrect buttons in the bottom toolbar.

Bug: 884615, 882508
Change-Id: Id791624d1505a18c6fd16bf6a64544a049503d16
Reviewed-on: https://chromium-review.googlesource.com/1228936Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592048}
parent 614a7d91
......@@ -423,13 +423,13 @@ public class LayoutManagerChrome extends LayoutManager implements OverviewModeBe
@Override
public void swipeFinished() {
if (mToolbarSwipeLayout == null) return;
if (mToolbarSwipeLayout == null || !mToolbarSwipeLayout.isActive()) return;
mToolbarSwipeLayout.swipeFinished(time());
}
@Override
public void swipeFlingOccurred(float x, float y, float tx, float ty, float vx, float vy) {
if (mToolbarSwipeLayout == null) return;
if (mToolbarSwipeLayout == null || !mToolbarSwipeLayout.isActive()) return;
mToolbarSwipeLayout.swipeFlingOccurred(time(), x, y, tx, ty, vx, vy);
}
......
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