@@ -8186,8 +8186,6 @@ private final void performLayoutAndPlaceSurfacesLockedInner(
81868186 final int N = mWindows .size ();
81878187 for (i =N -1 ; i >=0 ; i --) {
81888188 WindowState w = mWindows .get (i );
8189- //Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing");
8190- w .mContentChanged = false ;
81918189
81928190 if (someoneLosingFocus && w == mCurrentFocus && w .isDisplayedLw ()) {
81938191 focusDisplayed = true ;
@@ -8289,6 +8287,27 @@ private final void performLayoutAndPlaceSurfacesLockedInner(
82898287 for (i =N -1 ; i >=0 ; i --) {
82908288 final WindowState w = mWindows .get (i );
82918289 final WindowStateAnimator winAnimator = w .mWinAnimator ;
8290+
8291+ // If the window has moved due to its containing
8292+ // content frame changing, then we'd like to animate
8293+ // it.
8294+ if (w .mHasSurface && w .shouldAnimateMove ()) {
8295+ // Frame has moved, containing content frame
8296+ // has also moved, and we're not currently animating...
8297+ // let's do something.
8298+ Animation a = AnimationUtils .loadAnimation (mContext ,
8299+ com .android .internal .R .anim .window_move_from_decor );
8300+ winAnimator .setAnimation (a );
8301+ winAnimator .mAnimDw = w .mLastFrame .left - w .mFrame .left ;
8302+ winAnimator .mAnimDh = w .mLastFrame .top - w .mFrame .top ;
8303+ } else {
8304+ winAnimator .mAnimDw = innerDw ;
8305+ winAnimator .mAnimDh = innerDh ;
8306+ }
8307+
8308+ //Slog.i(TAG, "Window " + this + " clearing mContentChanged - done placing");
8309+ w .mContentChanged = false ;
8310+
82928311 // TODO(cmautner): Can this move up to the loop at the end of try/catch above?
82938312 updateResizingWindows (w );
82948313
@@ -8308,24 +8327,6 @@ private final void performLayoutAndPlaceSurfacesLockedInner(
83088327 }
83098328 }
83108329 }
8311-
8312- // If the window has moved due to its containing
8313- // content frame changing, then we'd like to animate
8314- // it. The checks here are ordered by what is least
8315- // likely to be true first.
8316- if (w .shouldAnimateMove ()) {
8317- // Frame has moved, containing content frame
8318- // has also moved, and we're not currently animating...
8319- // let's do something.
8320- Animation a = AnimationUtils .loadAnimation (mContext ,
8321- com .android .internal .R .anim .window_move_from_decor );
8322- winAnimator .setAnimation (a );
8323- winAnimator .mAnimDw = w .mLastFrame .left - w .mFrame .left ;
8324- winAnimator .mAnimDh = w .mLastFrame .top - w .mFrame .top ;
8325- } else {
8326- winAnimator .mAnimDw = innerDw ;
8327- winAnimator .mAnimDh = innerDh ;
8328- }
83298330 }
83308331 }
83318332
0 commit comments