summaryrefslogtreecommitdiffstats
path: root/services/java/com/android
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-04-05 18:29:35 -0700
committerDianne Hackborn <hackbod@google.com>2012-04-05 18:29:35 -0700
commit42c45856f5d8927e188ed1c9c3c8dd711af5796e (patch)
tree5deeac926980f3378037273a8204049e5f07853c /services/java/com/android
parent9828830611137bb751ab3512082a3bd31f439e38 (diff)
downloadframeworks_base-42c45856f5d8927e188ed1c9c3c8dd711af5796e.zip
frameworks_base-42c45856f5d8927e188ed1c9c3c8dd711af5796e.tar.gz
frameworks_base-42c45856f5d8927e188ed1c9c3c8dd711af5796e.tar.bz2
Fix so that windows again animate when moving.
Change-Id: I2441d0c892687b8cda239815caf77837cd21093e
Diffstat (limited to 'services/java/com/android')
-rw-r--r--services/java/com/android/server/wm/WindowManagerService.java41
1 files changed, 21 insertions, 20 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 654cfdf..36fad7f 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -8400,8 +8400,6 @@ public class WindowManagerService extends IWindowManager.Stub
final int N = mWindows.size();
for (i=N-1; i>=0; i--) {
WindowState w = mWindows.get(i);
- //Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing");
- w.mContentChanged = false;
if (someoneLosingFocus && w == mCurrentFocus && w.isDisplayedLw()) {
focusDisplayed = true;
@@ -8503,6 +8501,27 @@ public class WindowManagerService extends IWindowManager.Stub
for (i=N-1; i>=0; i--) {
final WindowState w = mWindows.get(i);
final WindowStateAnimator winAnimator = w.mWinAnimator;
+
+ // If the window has moved due to its containing
+ // content frame changing, then we'd like to animate
+ // it.
+ if (w.mHasSurface && w.shouldAnimateMove()) {
+ // Frame has moved, containing content frame
+ // has also moved, and we're not currently animating...
+ // let's do something.
+ Animation a = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.window_move_from_decor);
+ winAnimator.setAnimation(a);
+ winAnimator.mAnimDw = w.mLastFrame.left - w.mFrame.left;
+ winAnimator.mAnimDh = w.mLastFrame.top - w.mFrame.top;
+ } else {
+ winAnimator.mAnimDw = innerDw;
+ winAnimator.mAnimDh = innerDh;
+ }
+
+ //Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing");
+ w.mContentChanged = false;
+
// TODO(cmautner): Can this move up to the loop at the end of try/catch above?
updateResizingWindows(w);
@@ -8522,24 +8541,6 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
}
-
- // If the window has moved due to its containing
- // content frame changing, then we'd like to animate
- // it. The checks here are ordered by what is least
- // likely to be true first.
- if (w.shouldAnimateMove()) {
- // Frame has moved, containing content frame
- // has also moved, and we're not currently animating...
- // let's do something.
- Animation a = AnimationUtils.loadAnimation(mContext,
- com.android.internal.R.anim.window_move_from_decor);
- winAnimator.setAnimation(a);
- winAnimator.mAnimDw = w.mLastFrame.left - w.mFrame.left;
- winAnimator.mAnimDh = w.mLastFrame.top - w.mFrame.top;
- } else {
- winAnimator.mAnimDw = innerDw;
- winAnimator.mAnimDh = innerDh;
- }
}
}