Fixing user getting stuck in quick-switch state

am: 55d1e44c47

Change-Id: I612d2325f62509e069c1307ad68091fdf599ac6c
This commit is contained in:
Sunny Goyal
2019-05-24 19:06:01 -07:00
committed by android-build-merger
@@ -1261,7 +1261,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
} else {
taskView = mRecentsView.updateThumbnail(mRunningTaskId, mTaskSnapshot);
}
if (taskView != null) {
if (taskView != null && !mCanceled) {
// Defer finishing the animation until the next launcher frame with the
// new thumbnail
finishTransitionPosted = new WindowCallbacksCompat(taskView) {
@@ -1271,6 +1271,13 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
@Override
public void onPostDraw(Canvas canvas) {
// If we were cancelled after this was attached, do not update
// the state.
if (mCanceled) {
detach();
return;
}
if (mDeferFrameCount > 0) {
mDeferFrameCount--;
// Workaround, detach and reattach to invalidate the root node for