Fix quickswitch flickers/ignored swipes

- Don't set current page to running task when applying load plan,
  if we are already settling on a new task to launch.
- When starting a new task, finish to the running app if that's
  the task being started (should not happen with above change)
- When disabling free scroll mode, don't snap to a page if we're
  already on it. This was setting mNextPage so the first check
  was falsing.

Bug: 142068081
Change-Id: I5b392d9726a81c51718d2f94eee6cd4f78b61f69
Merged-In: I5b392d9726a81c51718d2f94eee6cd4f78b61f69
(cherry picked from commit af33f2c9d4)
(cherry picked from commit 4d86c804ba)
This commit is contained in:
Tony Wickham
2019-10-04 12:55:22 -07:00
committed by android-build-team Robot
parent 05be86068f
commit ddd057e87c
3 changed files with 19 additions and 6 deletions
+3 -1
View File
@@ -1088,7 +1088,9 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
if (mFreeScroll) {
setCurrentPage(getNextPage());
} else if (wasFreeScroll) {
snapToPage(getNextPage());
if (getScrollForPage(getNextPage()) != getScrollX()) {
snapToPage(getNextPage());
}
}
}