OSDN Git Service

Revert "Trebuchet: always set initial wallpaper offsets"
authorArne Coucheron <arco68@gmail.com>
Mon, 31 Oct 2016 04:54:01 +0000 (05:54 +0100)
committerArne Coucheron <arco68@gmail.com>
Mon, 31 Oct 2016 05:15:32 +0000 (06:15 +0100)
 * Updated wallpaper handling in Android seems to have made
   this workaround obsolete. Reverting it fixes the glitch
   with shifting wallpaper after boot.

This reverts commit 58f05fa6e401815a68a22f62abb16fc935ecda88.

Change-Id: I233ce4338a71510b43ffbaf58eded8bd714ed6b5

src/com/android/launcher3/Workspace.java

index 20e05a1..7252ca4 100644 (file)
@@ -1388,7 +1388,6 @@ public class Workspace extends PagedView
         // Don't use all the wallpaper for parallax until you have at least this many pages
         private final int MIN_PARALLAX_PAGE_SPAN = 3;
         int mNumScreens;
-        boolean mCompletedInitialOffset;
 
         public WallpaperOffsetInterpolator() {
             mChoreographer = Choreographer.getInstance();
@@ -1403,8 +1402,7 @@ public class Workspace extends PagedView
         private void updateOffset(boolean force) {
             if (mWaitingForUpdate || force) {
                 mWaitingForUpdate = false;
-                if ((!mCompletedInitialOffset || computeScrollOffset()) && mWindowToken != null) {
-                    mCompletedInitialOffset = true;
+                if (computeScrollOffset() && mWindowToken != null) {
                     try {
                         mWallpaperManager.setWallpaperOffsets(mWindowToken,
                                 mWallpaperOffset.getCurrX(), 0.5f);