Merge "Adding workaround to jump in wallpaper offsets." into ub-launcher3-calgary

This commit is contained in:
Winson Chung
2016-08-02 20:01:31 +00:00
committed by Android (Google) Code Review
@@ -208,8 +208,9 @@ public class WallpaperOffsetInterpolator implements Choreographer.FrameCallback
scheduleUpdate();
mFinalOffset = Math.max(0f, Math.min(x, 1f));
if (getNumScreensExcludingEmptyAndCustom() != mNumScreens) {
if (mNumScreens > 0) {
// Don't animate if we're going from 0 screens
if (mNumScreens > 0 && Float.compare(mCurrentOffset, mFinalOffset) != 0) {
// Don't animate if we're going from 0 screens, or if the final offset is the same
// as the current offset
animateToFinal();
}
mNumScreens = getNumScreensExcludingEmptyAndCustom();