summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-10-07 09:02:15 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-07 09:02:15 -0700
commit6d5d7fcba944e772041f20022ac275a2ac057eb5 (patch)
tree5b9a7bee24489df459556e132503132bbe884c33 /services
parent88ae2e2abeda94f3ec1d87ffad35e7e5d716a94f (diff)
parent52177738e8fa38e2f7769db1bcad40e7405baf17 (diff)
downloadframeworks_base-6d5d7fcba944e772041f20022ac275a2ac057eb5.zip
frameworks_base-6d5d7fcba944e772041f20022ac275a2ac057eb5.tar.gz
frameworks_base-6d5d7fcba944e772041f20022ac275a2ac057eb5.tar.bz2
am 52177738: Merge "Fix issue #7296314, issue #7296314." into jb-mr1-dev
* commit '52177738e8fa38e2f7769db1bcad40e7405baf17': Fix issue #7296314, issue #7296314.
Diffstat (limited to 'services')
-rwxr-xr-xservices/java/com/android/server/wm/WindowManagerService.java23
-rw-r--r--services/java/com/android/server/wm/WindowStateAnimator.java2
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: