diff options
| author | 2011-03-08 15:32:42 -0800 | |
|---|---|---|
| committer | 2011-03-08 15:34:20 -0800 | |
| commit | 2aded18b0ef9f189771f70f05091493a44ec46ae (patch) | |
| tree | 53e2a83405e043183580777cd4c91ea93df70619 | |
| parent | 8496ddc536eb917c813b7928f174c828d2275ada (diff) | |
Fix 4025684: Don't include wallpaper dimensions in bounds calculation
This fixes a bug where we would capture the statusbar region in
thumbnails because the wallpaper was used in the bounds calculation.
Change-Id: I572221e83c4c363afe90e59bece9a291ce694a15
| -rw-r--r-- | services/java/com/android/server/wm/WindowManagerService.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index eed41a0c0e9a..aad3572ebeee 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -4791,13 +4791,17 @@ public class WindowManagerService extends IWindowManager.Stub if (maxLayer < ws.mAnimLayer) { maxLayer = ws.mAnimLayer; } - final Rect wf = ws.mFrame; - final Rect cr = ws.mContentInsets; - int left = wf.left + cr.left; - int top = wf.top + cr.top; - int right = wf.right - cr.right; - int bottom = wf.bottom - cr.bottom; - frame.union(left, top, right, bottom); + + // Don't include wallpaper in bounds calculation + if (!ws.mIsWallpaper) { + final Rect wf = ws.mFrame; + final Rect cr = ws.mContentInsets; + int left = wf.left + cr.left; + int top = wf.top + cr.top; + int right = wf.right - cr.right; + int bottom = wf.bottom - cr.bottom; + frame.union(left, top, right, bottom); + } } Binder.restoreCallingIdentity(ident); |