summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-05-08 15:51:26 -0700
committerDianne Hackborn <hackbod@google.com>2013-05-08 18:05:58 -0700
commitbee1fb9363efb26cd7aee166fe24331061e33ad4 (patch)
tree33a85f4a38325353873c64cc7f3a325eb9902bb8 /services
parent214cb0d489a82b6cbe8a7c5ce8efbb77e985c166 (diff)
downloadframeworks_base-bee1fb9363efb26cd7aee166fe24331061e33ad4.zip
frameworks_base-bee1fb9363efb26cd7aee166fe24331061e33ad4.tar.gz
frameworks_base-bee1fb9363efb26cd7aee166fe24331061e33ad4.tar.bz2
DO NOT MERGE. Fix issue #8868003: Recents thumbnails scale...
...+ zoom to wrong place We need to make sure the overscan insets are never negative. Change-Id: I6ca82acc2a6c887085a5d14d03a55ea78451e4b6
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/wm/WindowState.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index e53a721..dfb22a7 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -534,10 +534,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
if (visible.bottom > frame.bottom) visible.bottom = frame.bottom;
final Rect overscanInsets = mOverscanInsets;
- overscanInsets.left = overscan.left-frame.left;
- overscanInsets.top = overscan.top-frame.top;
- overscanInsets.right = frame.right-overscan.right;
- overscanInsets.bottom = frame.bottom-overscan.bottom;
+ overscanInsets.left = overscan.left > frame.left ? overscan.left-frame.left : 0;
+ overscanInsets.top = overscan.top > frame.top ? overscan.top-frame.top : 0;
+ overscanInsets.right = overscan.right < frame.right ? frame.right-overscan.right : 0;
+ overscanInsets.bottom = overscan.bottom < frame.bottom ? frame.bottom-overscan.bottom : 0;
final Rect contentInsets = mContentInsets;
contentInsets.left = content.left-frame.left;