am cb359697: Merge "DO NOT MERGE. Fix issue #8868003: Recents thumbnails scale..." into jb-mr2-dev
* commit 'cb35969708e88057bda7c54c7b3ac1d606ad95c5':
DO NOT MERGE. Fix issue #8868003: Recents thumbnails scale...
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 @@
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;