|
22 | 22 | import com.android.internal.policy.impl.PhoneWindowManager; |
23 | 23 |
|
24 | 24 | import java.io.PrintWriter; |
| 25 | +import java.util.ArrayList; |
25 | 26 | import java.util.HashSet; |
26 | 27 |
|
27 | 28 | /** |
@@ -172,6 +173,9 @@ private void updateWindowsAppsAndRotationAnimationsLocked() { |
172 | 173 | private void updateWindowsAndWallpaperLocked() { |
173 | 174 | ++mTransactionSequence; |
174 | 175 |
|
| 176 | + ArrayList<WindowStateAnimator> unForceHiding = null; |
| 177 | + boolean wallpaperInUnForceHiding = false; |
| 178 | + |
175 | 179 | for (int i = mService.mWindows.size() - 1; i >= 0; i--) { |
176 | 180 | WindowState win = mService.mWindows.get(i); |
177 | 181 | WindowStateAnimator winAnimator = win.mWinAnimator; |
@@ -267,13 +271,12 @@ private void updateWindowsAndWallpaperLocked() { |
267 | 271 | if (changed) { |
268 | 272 | if ((mBulkUpdateParams & SET_FORCE_HIDING_CHANGED) != 0 |
269 | 273 | && win.isVisibleNow() /*w.isReadyForDisplay()*/) { |
270 | | - // Assume we will need to animate. If |
271 | | - // we don't (because the wallpaper will |
272 | | - // stay with the lock screen), then we will |
273 | | - // clean up later. |
274 | | - Animation a = mPolicy.createForceHideEnterAnimation(); |
275 | | - if (a != null) { |
276 | | - winAnimator.setAnimation(a); |
| 274 | + if (unForceHiding == null) { |
| 275 | + unForceHiding = new ArrayList<WindowStateAnimator>(); |
| 276 | + } |
| 277 | + unForceHiding.add(winAnimator); |
| 278 | + if ((win.mAttrs.flags&WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER) != 0) { |
| 279 | + wallpaperInUnForceHiding = true; |
277 | 280 | } |
278 | 281 | } |
279 | 282 | if (mCurrentFocus == null || mCurrentFocus.mLayer < win.mLayer) { |
@@ -356,6 +359,17 @@ private void updateWindowsAndWallpaperLocked() { |
356 | 359 | } |
357 | 360 | } |
358 | 361 | } // end forall windows |
| 362 | + |
| 363 | + // If we have windows that are being show due to them no longer |
| 364 | + // being force-hidden, apply the appropriate animation to them. |
| 365 | + if (unForceHiding != null) { |
| 366 | + for (int i=unForceHiding.size()-1; i>=0; i--) { |
| 367 | + Animation a = mPolicy.createForceHideEnterAnimation(wallpaperInUnForceHiding); |
| 368 | + if (a != null) { |
| 369 | + unForceHiding.get(i).setAnimation(a); |
| 370 | + } |
| 371 | + } |
| 372 | + } |
359 | 373 | } |
360 | 374 |
|
361 | 375 | private void testTokenMayBeDrawnLocked() { |
|
0 commit comments