From 30bc34f191ca8a009af313fc751e5b4bff6e39a1 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Tue, 25 Jan 2011 12:56:56 -0800 Subject: Fix surface frame size reporting. The SurfaceHolder provided by the wallpaper service was not reporting the correct size in getSurfaceFrame(). This broke an optimization in the ImageWallpaper. The old code happened to work because calling lockCanvas on the SurfaceHolder with a null dirty rectangle happened to have the side-effect of updating the SurfaceHolder's surface frame size field because it passed mSurfaceFrame as the dirty rect, causing mSurfaceFrame to be set to the size of the region to be drawn. However, relying on this side-effect is wrong. Among other things, the dirty region could actually be smaller than the surface frame. This patch fixes WallpaperService, SurfaceView and ViewRoot to ensure that the surface frame size is always set explicitly and is not modified by calls to lockCanvas. Change-Id: I10948f5ec269409ceaf0f7d32b3f6731e9499ebc --- policy/src/com/android/internal/policy/impl/PhoneWindow.java | 1 - 1 file changed, 1 deletion(-) (limited to 'policy') diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 6a1d199..88f30ed 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -116,7 +116,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { private ViewGroup mContentParent; SurfaceHolder.Callback2 mTakeSurfaceCallback; - BaseSurfaceHolder mSurfaceHolder; InputQueue.Callback mTakeInputQueueCallback; -- cgit v1.1