WindowManagerService not propagating X and Y steps

WindowManagerService received X and Y offset steps but failed to pass
them off to the relavent wallpaperservice.

Live wallpapers expect a valid value for xOffsetStep and yOffsetStep
when the WallpaperService.Engine::onOffsetsChanged function is called
As specified here:
https://developer.android.com/reference/android/service/wallpaper/WallpaperService.Engine.html
onOffsetsChanged(float,float, float, float, int, int)

See bug report:
https://code.google.com/p/android/issues/detail?id=173607

Change-Id: I532dedf2db055e27d6eca813e30346e37f52dc65
(cherry picked from commit e03ea68d0a7f7d7c60663feae587225cca3a3a5b)
This commit is contained in:
Richard MacGregor
2015-04-17 09:26:36 -07:00
parent a194eb9b5d
commit 74d2afdf0b

View File

@@ -2206,6 +2206,16 @@ public class WindowManagerService extends IWindowManager.Stub
} else if (changingTarget.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) {
mLastWallpaperDisplayOffsetY = changingTarget.mWallpaperDisplayOffsetY;
}
if (target.mWallpaperXStep >= 0) {
mLastWallpaperXStep = target.mWallpaperXStep;
} else if (changingTarget.mWallpaperXStep >= 0) {
mLastWallpaperXStep = changingTarget.mWallpaperXStep;
}
if (target.mWallpaperYStep >= 0) {
mLastWallpaperYStep = target.mWallpaperYStep;
} else if (changingTarget.mWallpaperYStep >= 0) {
mLastWallpaperYStep = changingTarget.mWallpaperYStep;
}
}
int curTokenIndex = mWallpaperTokens.size();