// 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();
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);