am cc0a17cb: Merge change 22290 into eclair

Merge commit 'cc0a17cb08c6a6ee2f27c00b7f658e4734fdf0c9' into eclair-plus-aosp

* commit 'cc0a17cb08c6a6ee2f27c00b7f658e4734fdf0c9':
  Fix typo: the x offset was assigned to the y coordinate.
This commit is contained in:
Romain Guy
2009-08-21 13:38:44 -07:00
committed by Android Git Automerger

View File

@@ -21,7 +21,6 @@ import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.service.wallpaper.WallpaperService;
import android.util.Log;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.content.Context;
@@ -87,14 +86,13 @@ public class ImageWallpaper extends WallpaperService {
@Override
public void onTouchEvent(MotionEvent event) {
super.onTouchEvent(event);
Log.i("foo", "Touch event: " + event);
}
@Override
public void onOffsetsChanged(float xOffset, float yOffset,
int xPixels, int yPixels) {
mXOffset = xOffset;
mYOffset = xOffset;
mYOffset = yOffset;
drawFrame();
}
@@ -128,9 +126,9 @@ public class ImageWallpaper extends WallpaperService {
final int availw = bw-dw;
final int availh = bh-dh;
int xPixels = availw > 0
? -(int)(availw*mXOffset+.5f) : -(int)(availw/2);
? -(int)(availw*mXOffset+.5f) : -(availw/2);
int yPixels = availh > 0
? -(int)(availh*mYOffset+.5f) : -(int)(availh/2);
? -(int)(availh*mYOffset+.5f) : -(availh/2);
c.translate(xPixels, yPixels);
c.drawColor(0xff000000);
background.draw(c);