@@ -79,7 +79,7 @@ private void updateWindowsAppsAndRotationAnimationsLocked() {
7979 }
8080 }
8181 }
82-
82+
8383 final int NEAT = mService .mExitingAppTokens .size ();
8484 for (i =0 ; i <NEAT ; i ++) {
8585 final AppWindowToken appToken = mService .mExitingAppTokens .get (i );
@@ -115,6 +115,7 @@ private void updateWindowsAndWallpaperLocked() {
115115
116116 for (int i = mService .mWindows .size () - 1 ; i >= 0 ; i --) {
117117 WindowState w = mService .mWindows .get (i );
118+ WindowStateAnimator winAnimator = w .mWinAnimator ;
118119
119120 final WindowManager .LayoutParams attrs = w .mAttrs ;
120121
@@ -143,16 +144,16 @@ private void updateWindowsAndWallpaperLocked() {
143144 // let's do something.
144145 Animation a = AnimationUtils .loadAnimation (mContext ,
145146 com .android .internal .R .anim .window_move_from_decor );
146- w .setAnimation (a );
147+ winAnimator .setAnimation (a );
147148 w .mAnimDw = w .mLastFrame .left - w .mFrame .left ;
148149 w .mAnimDh = w .mLastFrame .top - w .mFrame .top ;
149150 } else {
150151 w .mAnimDw = mInnerDw ;
151152 w .mAnimDh = mInnerDh ;
152153 }
153154
154- final boolean wasAnimating = w .mWasAnimating ;
155- final boolean nowAnimating = w .stepAnimationLocked (mCurrentTime );
155+ final boolean wasAnimating = winAnimator .mWasAnimating ;
156+ final boolean nowAnimating = winAnimator .stepAnimationLocked (mCurrentTime );
156157
157158 if (WindowManagerService .DEBUG_WALLPAPER ) {
158159 Slog .v (TAG , w + ": wasAnimating=" + wasAnimating +
@@ -163,17 +164,17 @@ private void updateWindowsAndWallpaperLocked() {
163164 // an animating window and take care of a request to run
164165 // a detached wallpaper animation.
165166 if (nowAnimating ) {
166- if (w .mAnimation != null ) {
167+ if (winAnimator .mAnimation != null ) {
167168 if ((w .mAttrs .flags &FLAG_SHOW_WALLPAPER ) != 0
168- && w .mAnimation .getDetachWallpaper ()) {
169+ && winAnimator .mAnimation .getDetachWallpaper ()) {
169170 mService .mInnerFields .mDetachedWallpaper = w ;
170171 }
171- if (w .mAnimation .getBackgroundColor () != 0 ) {
172+ if (winAnimator .mAnimation .getBackgroundColor () != 0 ) {
172173 if (mWindowAnimationBackground == null
173174 || (w .mAnimLayer < mWindowAnimationBackground .mAnimLayer )) {
174175 mWindowAnimationBackground = w ;
175176 mWindowAnimationBackgroundColor =
176- w .mAnimation .getBackgroundColor ();
177+ winAnimator .mAnimation .getBackgroundColor ();
177178 }
178179 }
179180 }
@@ -200,7 +201,7 @@ private void updateWindowsAndWallpaperLocked() {
200201 }
201202 }
202203
203- if (wasAnimating && !w .mAnimating && mService .mWallpaperTarget == w ) {
204+ if (wasAnimating && !winAnimator .mAnimating && mService .mWallpaperTarget == w ) {
204205 mService .mInnerFields .mWallpaperMayChange = true ;
205206 mPendingLayoutChanges |= WindowManagerPolicy .FINISH_LAYOUT_REDO_WALLPAPER ;
206207 if (WindowManagerService .DEBUG_LAYOUT_REPEATS ) {
@@ -219,7 +220,7 @@ private void updateWindowsAndWallpaperLocked() {
219220 mService .debugLayoutRepeats ("updateWindowsAndWallpaperLocked 3" );
220221 }
221222 mService .mFocusMayChange = true ;
222- } else if (w .isReadyForDisplay () && w .mAnimation == null ) {
223+ } else if (w .isReadyForDisplay () && winAnimator .mAnimation == null ) {
223224 mForceHiding = true ;
224225 }
225226 } else if (mPolicy .canBeForceHidden (w , attrs )) {
@@ -241,7 +242,7 @@ private void updateWindowsAndWallpaperLocked() {
241242 // clean up later.
242243 Animation a = mPolicy .createForceHideEnterAnimation ();
243244 if (a != null ) {
244- w .setAnimation (a );
245+ winAnimator .setAnimation (a );
245246 }
246247 }
247248 if (mCurrentFocus == null || mCurrentFocus .mLayer < w .mLayer ) {
@@ -277,15 +278,15 @@ private void updateWindowsAndWallpaperLocked() {
277278 WindowManagerService .DEBUG_ORIENTATION ) {
278279 Slog .v (TAG , "Eval win " + w + ": isDrawn="
279280 + w .isDrawnLw ()
280- + ", isAnimating=" + w .isAnimating ());
281+ + ", isAnimating=" + winAnimator .isAnimating ());
281282 if (!w .isDrawnLw ()) {
282283 Slog .v (TAG , "Not displayed: s=" + w .mSurface
283284 + " pv=" + w .mPolicyVisibility
284285 + " dp=" + w .mDrawPending
285286 + " cdp=" + w .mCommitDrawPending
286287 + " ah=" + w .mAttachedHidden
287288 + " th=" + atoken .hiddenRequested
288- + " a=" + w .mAnimating );
289+ + " a=" + winAnimator .mAnimating );
289290 }
290291 }
291292 if (w != atoken .startingWindow ) {
0 commit comments