Merge "Add error detection for aborting the recents scrolling during transition to home" into tm-qpr-dev am: 839297e232 am: d675769721
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19873684 Change-Id: I4e7fba7f2c510893d744317eedad78934e9b7a3c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
fcb43caf6b
4 files changed
+44
-6
No files matched your search
@@ -259,8 +259,13 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
abortScrollerAnimation(true);
|
||||
}
|
||||
|
||||
protected void onScrollerAnimationAborted() {
|
||||
// No-Op
|
||||
}
|
||||
|
||||
private void abortScrollerAnimation(boolean resetNextPage) {
|
||||
mScroller.abortAnimation();
|
||||
onScrollerAnimationAborted();
|
||||
// We need to clean up the next page here to avoid computeScrollHelper from
|
||||
// updating current page on the pass.
|
||||
if (resetNextPage) {
|
||||
@@ -555,11 +560,11 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
if (mAllowOverScroll) {
|
||||
if (newPos < mMinScroll && oldPos >= mMinScroll) {
|
||||
mEdgeGlowLeft.onAbsorb((int) mScroller.getCurrVelocity());
|
||||
mScroller.abortAnimation();
|
||||
abortScrollerAnimation(false);
|
||||
onEdgeAbsorbingScroll();
|
||||
} else if (newPos > mMaxScroll && oldPos <= mMaxScroll) {
|
||||
mEdgeGlowRight.onAbsorb((int) mScroller.getCurrVelocity());
|
||||
mScroller.abortAnimation();
|
||||
abortScrollerAnimation(false);
|
||||
onEdgeAbsorbingScroll();
|
||||
}
|
||||
}
|
||||
@@ -569,7 +574,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
int finalPos = mOrientationHandler.getPrimaryValue(mScroller.getFinalX(),
|
||||
mScroller.getFinalY());
|
||||
if (newPos == finalPos && mEdgeGlowLeft.isFinished() && mEdgeGlowRight.isFinished()) {
|
||||
mScroller.abortAnimation();
|
||||
abortScrollerAnimation(false);
|
||||
}
|
||||
|
||||
invalidate();
|
||||
|
||||
Reference in new issue
Block a user