diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-10-06 11:08:16 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-06 11:08:17 -0700 |
commit | 52177738e8fa38e2f7769db1bcad40e7405baf17 (patch) | |
tree | d21a132d2af3fbfe13c333b2380ad66733b4b224 /services | |
parent | d9c99124d4870361c7c1e28fb78adf245eb1305a (diff) | |
parent | 4c1e3183baf39ab69c0289c1511877a8bb0b0f75 (diff) | |
download | frameworks_base-52177738e8fa38e2f7769db1bcad40e7405baf17.zip frameworks_base-52177738e8fa38e2f7769db1bcad40e7405baf17.tar.gz frameworks_base-52177738e8fa38e2f7769db1bcad40e7405baf17.tar.bz2 |
Merge "Fix issue #7296314, issue #7296314." into jb-mr1-dev
Diffstat (limited to 'services')
-rwxr-xr-x | services/java/com/android/server/wm/WindowManagerService.java | 23 | ||||
-rw-r--r-- | services/java/com/android/server/wm/WindowStateAnimator.java | 2 |
2 files changed, 22 insertions, 3 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 0089046..545d1a9 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -8237,7 +8237,9 @@ public class WindowManagerService extends IWindowManager.Stub int seq = mLayoutSeq+1; if (seq < 0) seq = 0; mLayoutSeq = seq; - + + boolean behindDream = false; + // First perform layout of any root windows (not attached // to another window). int topAttached = -1; @@ -8247,7 +8249,8 @@ public class WindowManagerService extends IWindowManager.Stub // Don't do layout of a window if it is not visible, or // soon won't be visible, to avoid wasting time and funky // changes while a window is animating away. - final boolean gone = win.isGoneForLayoutLw(); + final boolean gone = (behindDream && mPolicy.canBeForceHidden(win, win.mAttrs)) + || win.isGoneForLayoutLw(); if (DEBUG_LAYOUT && !win.mLayoutAttached) { Slog.v(TAG, "1ST PASS " + win @@ -8282,6 +8285,12 @@ public class WindowManagerService extends IWindowManager.Stub //Slog.i(TAG, "Window " + this + " clearing mContentChanged - initial"); win.mContentChanged = false; } + if (win.mAttrs.type == TYPE_DREAM) { + // Don't layout windows behind a dream, so that if it + // does stuff like hide the status bar we won't get a + // bad transition when it goes away. + behindDream = true; + } win.mLayoutNeeded = false; win.prelayout(); mPolicy.layoutWindowLw(win, win.mAttrs, null); @@ -8306,6 +8315,8 @@ public class WindowManagerService extends IWindowManager.Stub mAnimator.mUniverseBackground = universeBackground; } + boolean attachedBehindDream = false; + // Now perform layout of attached windows, which usually // depend on the position of the window they are attached to. // XXX does not deal with windows that are attached to windows @@ -8323,6 +8334,9 @@ public class WindowManagerService extends IWindowManager.Stub // if they want. (We do the normal layout for INVISIBLE // windows, since that means "perform layout as normal, // just don't display"). + if (attachedBehindDream && mPolicy.canBeForceHidden(win, win.mAttrs)) { + continue; + } if ((win.mViewVisibility != View.GONE && win.mRelayoutCalled) || !win.mHaveFrame || win.mLayoutNeeded) { if (initial) { @@ -8338,6 +8352,11 @@ public class WindowManagerService extends IWindowManager.Stub + win.mContainingFrame + " mDisplayFrame=" + win.mDisplayFrame); } + } else if (win.mAttrs.type == TYPE_DREAM) { + // Don't layout windows behind a dream, so that if it + // does stuff like hide the status bar we won't get a + // bad transition when it goes away. + attachedBehindDream = behindDream; } } diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java index 817a234..43f7a08 100644 --- a/services/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/java/com/android/server/wm/WindowStateAnimator.java @@ -1500,7 +1500,7 @@ class WindowStateAnimator { int attr = -1; Animation a = null; if (anim != 0) { - a = AnimationUtils.loadAnimation(mContext, anim); + a = anim != -1 ? AnimationUtils.loadAnimation(mContext, anim) : null; } else { switch (transit) { case WindowManagerPolicy.TRANSIT_ENTER: |