summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/wm/WindowStateAnimator.java
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2013-09-30 22:32:42 -0400
committerJohn Spurlock <jspurlock@google.com>2013-10-02 18:12:16 -0400
commit4664623c304cf162b9a78f3aee3290a92e54b628 (patch)
treeff5f031afb3fe5911b546bd7b1d7432dcfa397c5 /services/java/com/android/server/wm/WindowStateAnimator.java
parent913f87ef637fc1d9a006c543833b6815090b94e8 (diff)
downloadframeworks_base-4664623c304cf162b9a78f3aee3290a92e54b628.zip
frameworks_base-4664623c304cf162b9a78f3aee3290a92e54b628.tar.gz
frameworks_base-4664623c304cf162b9a78f3aee3290a92e54b628.tar.bz2
Store decor rects per window for transition cropping.
Instead of keeping a single global system decor rect around in WindowManagerService, calculate and store policy-defined system-decor frame for each window. The per-window decor rect is useful for smooth transitions, since it determines window cropping during transition animations. Bug:10938001 Change-Id: Ice6652aa5946027c45c0b7ab4e46473a0f8e3f90
Diffstat (limited to 'services/java/com/android/server/wm/WindowStateAnimator.java')
-rw-r--r--services/java/com/android/server/wm/WindowStateAnimator.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java
index 533f626..e2fae89 100644
--- a/services/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/java/com/android/server/wm/WindowStateAnimator.java
@@ -1100,12 +1100,14 @@ class WindowStateAnimator {
} else {
applyDecorRect(mService.mScreenRect);
}
- } else if (w.mAttrs.type == WindowManager.LayoutParams.TYPE_UNIVERSE_BACKGROUND) {
- // The universe background isn't cropped.
+ } else if (w.mAttrs.type == WindowManager.LayoutParams.TYPE_UNIVERSE_BACKGROUND
+ || w.mDecorFrame.isEmpty()) {
+ // The universe background isn't cropped, nor windows without policy decor.
w.mSystemDecorRect.set(0, 0, w.mCompatFrame.width(),
w.mCompatFrame.height());
} else {
- applyDecorRect(mService.mSystemDecorRect);
+ // Crop to the system decor specified by policy.
+ applyDecorRect(w.mDecorFrame);
}
if (!w.mSystemDecorRect.equals(w.mLastSystemDecorRect)) {