diff options
author | Filip Gruszczynski <gruszczy@google.com> | 2015-06-05 23:00:32 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-06-05 23:00:32 +0000 |
commit | 17ba2e6c49b62c8763895aa6b81ffc06d7f3bc34 (patch) | |
tree | dd14c87f007adefda538e7dddaab9d3b8cff5bf9 | |
parent | edaf008c5e594d140aa430965a779f0b35280730 (diff) | |
parent | aaf1811dda607f10ab0f0ae80fd2b2b7cf9d0069 (diff) | |
download | frameworks_base-17ba2e6c49b62c8763895aa6b81ffc06d7f3bc34.zip frameworks_base-17ba2e6c49b62c8763895aa6b81ffc06d7f3bc34.tar.gz frameworks_base-17ba2e6c49b62c8763895aa6b81ffc06d7f3bc34.tar.bz2 |
am aaf1811d: Calculate outsets before window frame adjustment.
* commit 'aaf1811dda607f10ab0f0ae80fd2b2b7cf9d0069':
Calculate outsets before window frame adjustment.
-rw-r--r-- | services/core/java/com/android/server/wm/WindowState.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 9f67998..768dd2c 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -625,6 +625,16 @@ final class WindowState implements WindowManagerPolicy.WindowState { // Now make sure the window fits in the overall display. Gravity.applyDisplay(mAttrs.gravity, df, mFrame); + // Calculate the outsets before the content frame gets shrinked to the window frame. + if (hasOutsets) { + mOutsets.set(Math.max(mContentFrame.left - mOutsetFrame.left, 0), + Math.max(mContentFrame.top - mOutsetFrame.top, 0), + Math.max(mOutsetFrame.right - mContentFrame.right, 0), + Math.max(mOutsetFrame.bottom - mContentFrame.bottom, 0)); + } else { + mOutsets.set(0, 0, 0, 0); + } + // Make sure the content and visible frames are inside of the // final window frame. mContentFrame.set(Math.max(mContentFrame.left, mFrame.left), @@ -662,15 +672,6 @@ final class WindowState implements WindowManagerPolicy.WindowState { Math.max(mFrame.right - mStableFrame.right, 0), Math.max(mFrame.bottom - mStableFrame.bottom, 0)); - if (hasOutsets) { - mOutsets.set(Math.max(mContentFrame.left - mOutsetFrame.left, 0), - Math.max(mContentFrame.top - mOutsetFrame.top, 0), - Math.max(mOutsetFrame.right - mContentFrame.right, 0), - Math.max(mOutsetFrame.bottom - mContentFrame.bottom, 0)); - } else { - mOutsets.set(0, 0, 0, 0); - } - mCompatFrame.set(mFrame); if (mEnforceSizeCompat) { // If there is a size compatibility scale being applied to the |