diff options
author | Craig Mautner <cmautner@google.com> | 2012-04-06 08:00:47 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-04-06 08:00:47 -0700 |
commit | 7a3bc87468d2d2c48e9ae3071c82f7aa5251e7d5 (patch) | |
tree | 24d823cbdb0d167b10c5e86b1fa63c47b50b21f8 /services | |
parent | 419ad1e3b1f82c94ade87a70e7a4d033f9cab818 (diff) | |
parent | 42c45856f5d8927e188ed1c9c3c8dd711af5796e (diff) | |
download | frameworks_base-7a3bc87468d2d2c48e9ae3071c82f7aa5251e7d5.zip frameworks_base-7a3bc87468d2d2c48e9ae3071c82f7aa5251e7d5.tar.gz frameworks_base-7a3bc87468d2d2c48e9ae3071c82f7aa5251e7d5.tar.bz2 |
Merge "Fix so that windows again animate when moving."
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/wm/WindowManagerService.java | 41 |
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 3e74486..716b7b1 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -8186,8 +8186,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; @@ -8289,6 +8287,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); @@ -8308,24 +8327,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; - } } } |