Merge "Ensuring that snapToPage is completely aborted / cleaned up upon setCurrentPage (issue 11003904)" into jb-ub-now-indigo-rose

This commit is contained in:
Adam Cohen authored and Android (Google) Code Review committed 2013-10-01 18:21:12 +00:00
commit e269ca4298
1 file changed
+3
+3
View File
@@ -518,6 +518,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
void setCurrentPage(int currentPage) {
if (!mScroller.isFinished()) {
mScroller.abortAnimation();
// We need to clean up the next page here to avoid computeScrollHelper from
// updating current page on the pass.
mNextPage = INVALID_PAGE;
}
// don't introduce any checks like mCurrentPage == currentPage here-- if we change the
// the default