Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bc28274 authored by Winson's avatar Winson
Browse files

Adding workaround to jump in wallpaper offsets.

- Just skip the animation if we are animating to the same wallpaper 
  offset (which is the case when we are adding from all apps)

Bug: 28587903
Change-Id: Ib7b1828c1b099a665d68c22cb33ee62693f33f35
parent c42087e5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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();