summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-01-25 12:56:56 -0800
committerJeff Brown <jeffbrown@google.com>2011-01-25 13:10:30 -0800
commit30bc34f191ca8a009af313fc751e5b4bff6e39a1 (patch)
treedf69e21f61230b146a7718f590efadb72f130772 /policy
parentb8942108826893657ca0b8b6d5d6d153739a76f6 (diff)
downloadframeworks_base-30bc34f191ca8a009af313fc751e5b4bff6e39a1.zip
frameworks_base-30bc34f191ca8a009af313fc751e5b4bff6e39a1.tar.gz
frameworks_base-30bc34f191ca8a009af313fc751e5b4bff6e39a1.tar.bz2
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
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java1
1 files changed, 0 insertions, 1 deletions
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;