Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 1 | // Copyright 2012 Google Inc. All Rights Reserved. |
| 2 | |
| 3 | package com.android.server.wm; |
| 4 | |
| 5 | import android.graphics.Matrix; |
| 6 | import android.util.Slog; |
Dianne Hackborn | a57c695 | 2013-03-29 14:46:40 -0700 | [diff] [blame] | 7 | import android.util.TimeUtils; |
Craig Mautner | a91f9e2 | 2012-09-14 16:22:08 -0700 | [diff] [blame] | 8 | import android.view.Display; |
Mathias Agopian | 3866f0d | 2013-02-11 22:08:48 -0800 | [diff] [blame] | 9 | import android.view.SurfaceControl; |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 10 | import android.view.WindowManagerPolicy; |
| 11 | import android.view.animation.Animation; |
| 12 | import android.view.animation.Transformation; |
| 13 | |
| 14 | import java.io.PrintWriter; |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 15 | import java.util.ArrayList; |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 16 | |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 17 | public class AppWindowAnimator { |
Craig Mautner | fbf378c | 2012-04-23 17:24:21 -0700 | [diff] [blame] | 18 | static final String TAG = "AppWindowAnimator"; |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 19 | |
| 20 | final AppWindowToken mAppToken; |
| 21 | final WindowManagerService mService; |
| 22 | final WindowAnimator mAnimator; |
| 23 | |
| 24 | boolean animating; |
| 25 | Animation animation; |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 26 | boolean hasTransformation; |
| 27 | final Transformation transformation = new Transformation(); |
| 28 | |
| 29 | // Have we been asked to have this token keep the screen frozen? |
| 30 | // Protect with mAnimator. |
| 31 | boolean freezingScreen; |
| 32 | |
Dianne Hackborn | a57c695 | 2013-03-29 14:46:40 -0700 | [diff] [blame] | 33 | /** |
| 34 | * How long we last kept the screen frozen. |
| 35 | */ |
| 36 | int lastFreezeDuration; |
| 37 | |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 38 | // Offset to the window of all layers in the token, for use by |
| 39 | // AppWindowToken animations. |
| 40 | int animLayerAdjustment; |
| 41 | |
Craig Mautner | 6fbda63 | 2012-07-03 09:26:39 -0700 | [diff] [blame] | 42 | // Propagated from AppWindowToken.allDrawn, to determine when |
| 43 | // the state changes. |
| 44 | boolean allDrawn; |
| 45 | |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 46 | // Special surface for thumbnail animation. |
Mathias Agopian | 3866f0d | 2013-02-11 22:08:48 -0800 | [diff] [blame] | 47 | SurfaceControl thumbnail; |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 48 | int thumbnailTransactionSeq; |
| 49 | int thumbnailX; |
| 50 | int thumbnailY; |
| 51 | int thumbnailLayer; |
| 52 | Animation thumbnailAnimation; |
| 53 | final Transformation thumbnailTransformation = new Transformation(); |
| 54 | |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 55 | /** WindowStateAnimator from mAppAnimator.allAppWindows as of last performLayout */ |
Craig Mautner | bea12bd | 2012-08-20 10:18:34 -0700 | [diff] [blame] | 56 | ArrayList<WindowStateAnimator> mAllAppWinAnimators = new ArrayList<WindowStateAnimator>(); |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 57 | |
Craig Mautner | fbf378c | 2012-04-23 17:24:21 -0700 | [diff] [blame] | 58 | static final Animation sDummyAnimation = new DummyAnimation(); |
| 59 | |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 60 | public AppWindowAnimator(final AppWindowToken atoken) { |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 61 | mAppToken = atoken; |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 62 | mService = atoken.service; |
| 63 | mAnimator = atoken.mAnimator; |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 64 | } |
| 65 | |
Craig Mautner | 9339c40 | 2012-11-30 11:23:56 -0800 | [diff] [blame] | 66 | public void setAnimation(Animation anim, int width, int height) { |
Craig Mautner | 72669d1 | 2012-12-18 17:23:54 -0800 | [diff] [blame] | 67 | if (WindowManagerService.localLOGV) Slog.v(TAG, "Setting animation in " + mAppToken |
| 68 | + ": " + anim + " wxh=" + width + "x" + height |
| 69 | + " isVisible=" + mAppToken.isVisible()); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 70 | animation = anim; |
| 71 | animating = false; |
Craig Mautner | 9339c40 | 2012-11-30 11:23:56 -0800 | [diff] [blame] | 72 | if (!anim.isInitialized()) { |
| 73 | anim.initialize(width, height, width, height); |
| 74 | } |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 75 | anim.restrictDuration(WindowManagerService.MAX_ANIMATION_DURATION); |
| 76 | anim.scaleCurrentDuration(mService.mTransitionAnimationScale); |
| 77 | int zorder = anim.getZAdjustment(); |
| 78 | int adj = 0; |
| 79 | if (zorder == Animation.ZORDER_TOP) { |
| 80 | adj = WindowManagerService.TYPE_LAYER_OFFSET; |
| 81 | } else if (zorder == Animation.ZORDER_BOTTOM) { |
| 82 | adj = -WindowManagerService.TYPE_LAYER_OFFSET; |
| 83 | } |
| 84 | |
| 85 | if (animLayerAdjustment != adj) { |
| 86 | animLayerAdjustment = adj; |
| 87 | updateLayers(); |
| 88 | } |
| 89 | // Start out animation gone if window is gone, or visible if window is visible. |
| 90 | transformation.clear(); |
Craig Mautner | 72669d1 | 2012-12-18 17:23:54 -0800 | [diff] [blame] | 91 | transformation.setAlpha(mAppToken.isVisible() ? 1 : 0); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 92 | hasTransformation = true; |
| 93 | } |
| 94 | |
| 95 | public void setDummyAnimation() { |
Craig Mautner | 72669d1 | 2012-12-18 17:23:54 -0800 | [diff] [blame] | 96 | if (WindowManagerService.localLOGV) Slog.v(TAG, "Setting dummy animation in " + mAppToken |
| 97 | + " isVisible=" + mAppToken.isVisible()); |
Craig Mautner | 1d961d4 | 2012-05-27 12:02:11 -0700 | [diff] [blame] | 98 | animation = sDummyAnimation; |
Craig Mautner | 94ef9df | 2012-05-02 17:08:39 -0700 | [diff] [blame] | 99 | hasTransformation = true; |
| 100 | transformation.clear(); |
Craig Mautner | 72669d1 | 2012-12-18 17:23:54 -0800 | [diff] [blame] | 101 | transformation.setAlpha(mAppToken.isVisible() ? 1 : 0); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | public void clearAnimation() { |
| 105 | if (animation != null) { |
| 106 | animation = null; |
| 107 | animating = true; |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 108 | } |
| 109 | clearThumbnail(); |
Craig Mautner | 7636dfb | 2012-11-16 15:24:11 -0800 | [diff] [blame] | 110 | if (mAppToken.deferClearAllDrawn) { |
| 111 | mAppToken.allDrawn = false; |
| 112 | mAppToken.deferClearAllDrawn = false; |
| 113 | } |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 114 | } |
| 115 | |
| 116 | public void clearThumbnail() { |
| 117 | if (thumbnail != null) { |
| 118 | thumbnail.destroy(); |
| 119 | thumbnail = null; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | void updateLayers() { |
| 124 | final int N = mAppToken.allAppWindows.size(); |
| 125 | final int adj = animLayerAdjustment; |
| 126 | thumbnailLayer = -1; |
| 127 | for (int i=0; i<N; i++) { |
| 128 | final WindowState w = mAppToken.allAppWindows.get(i); |
| 129 | final WindowStateAnimator winAnimator = w.mWinAnimator; |
| 130 | winAnimator.mAnimLayer = w.mLayer + adj; |
| 131 | if (winAnimator.mAnimLayer > thumbnailLayer) { |
| 132 | thumbnailLayer = winAnimator.mAnimLayer; |
| 133 | } |
Craig Mautner | fbf378c | 2012-04-23 17:24:21 -0700 | [diff] [blame] | 134 | if (WindowManagerService.DEBUG_LAYERS) Slog.v(TAG, "Updating layer " + w + ": " |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 135 | + winAnimator.mAnimLayer); |
| 136 | if (w == mService.mInputMethodTarget && !mService.mInputMethodTargetWaitingAnim) { |
| 137 | mService.setInputMethodAnimLayerAdjustment(adj); |
| 138 | } |
Craig Mautner | 9686833 | 2012-12-04 14:29:11 -0800 | [diff] [blame] | 139 | if (w == mService.mWallpaperTarget && mService.mLowerWallpaperTarget == null) { |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 140 | mService.setWallpaperAnimLayerAdjustmentLocked(adj); |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | private void stepThumbnailAnimation(long currentTime) { |
| 146 | thumbnailTransformation.clear(); |
| 147 | thumbnailAnimation.getTransformation(currentTime, thumbnailTransformation); |
| 148 | thumbnailTransformation.getMatrix().preTranslate(thumbnailX, thumbnailY); |
Craig Mautner | a91f9e2 | 2012-09-14 16:22:08 -0700 | [diff] [blame] | 149 | |
| 150 | ScreenRotationAnimation screenRotationAnimation = |
| 151 | mAnimator.getScreenRotationAnimationLocked(Display.DEFAULT_DISPLAY); |
| 152 | final boolean screenAnimation = screenRotationAnimation != null |
| 153 | && screenRotationAnimation.isAnimating(); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 154 | if (screenAnimation) { |
Craig Mautner | a91f9e2 | 2012-09-14 16:22:08 -0700 | [diff] [blame] | 155 | thumbnailTransformation.postCompose(screenRotationAnimation.getEnterTransformation()); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 156 | } |
| 157 | // cache often used attributes locally |
| 158 | final float tmpFloats[] = mService.mTmpFloats; |
| 159 | thumbnailTransformation.getMatrix().getValues(tmpFloats); |
| 160 | if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(thumbnail, |
| 161 | "thumbnail", "POS " + tmpFloats[Matrix.MTRANS_X] |
| 162 | + ", " + tmpFloats[Matrix.MTRANS_Y], null); |
| 163 | thumbnail.setPosition(tmpFloats[Matrix.MTRANS_X], tmpFloats[Matrix.MTRANS_Y]); |
| 164 | if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(thumbnail, |
| 165 | "thumbnail", "alpha=" + thumbnailTransformation.getAlpha() |
| 166 | + " layer=" + thumbnailLayer |
| 167 | + " matrix=[" + tmpFloats[Matrix.MSCALE_X] |
| 168 | + "," + tmpFloats[Matrix.MSKEW_Y] |
| 169 | + "][" + tmpFloats[Matrix.MSKEW_X] |
| 170 | + "," + tmpFloats[Matrix.MSCALE_Y] + "]", null); |
| 171 | thumbnail.setAlpha(thumbnailTransformation.getAlpha()); |
| 172 | // The thumbnail is layered below the window immediately above this |
| 173 | // token's anim layer. |
| 174 | thumbnail.setLayer(thumbnailLayer + WindowManagerService.WINDOW_LAYER_MULTIPLIER |
| 175 | - WindowManagerService.LAYER_OFFSET_THUMBNAIL); |
| 176 | thumbnail.setMatrix(tmpFloats[Matrix.MSCALE_X], tmpFloats[Matrix.MSKEW_Y], |
| 177 | tmpFloats[Matrix.MSKEW_X], tmpFloats[Matrix.MSCALE_Y]); |
| 178 | } |
| 179 | |
| 180 | private boolean stepAnimation(long currentTime) { |
| 181 | if (animation == null) { |
| 182 | return false; |
| 183 | } |
| 184 | transformation.clear(); |
| 185 | final boolean more = animation.getTransformation(currentTime, transformation); |
Craig Mautner | 9e80944 | 2012-06-22 17:13:04 -0700 | [diff] [blame] | 186 | if (false && WindowManagerService.DEBUG_ANIM) Slog.v( |
Craig Mautner | 8a197a4 | 2012-04-24 16:59:36 -0700 | [diff] [blame] | 187 | TAG, "Stepped animation in " + mAppToken + ": more=" + more + ", xform=" + transformation); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 188 | if (!more) { |
| 189 | animation = null; |
| 190 | clearThumbnail(); |
| 191 | if (WindowManagerService.DEBUG_ANIM) Slog.v( |
Craig Mautner | 8a197a4 | 2012-04-24 16:59:36 -0700 | [diff] [blame] | 192 | TAG, "Finished animation in " + mAppToken + " @ " + currentTime); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 193 | } |
| 194 | hasTransformation = more; |
| 195 | return more; |
| 196 | } |
| 197 | |
| 198 | // This must be called while inside a transaction. |
Craig Mautner | 9339c40 | 2012-11-30 11:23:56 -0800 | [diff] [blame] | 199 | boolean stepAnimationLocked(long currentTime) { |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 200 | if (mService.okToDisplay()) { |
| 201 | // We will run animations as long as the display isn't frozen. |
| 202 | |
Craig Mautner | fbf378c | 2012-04-23 17:24:21 -0700 | [diff] [blame] | 203 | if (animation == sDummyAnimation) { |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 204 | // This guy is going to animate, but not yet. For now count |
| 205 | // it as not animating for purposes of scheduling transactions; |
| 206 | // when it is really time to animate, this will be set to |
| 207 | // a real animation and the next call will execute normally. |
| 208 | return false; |
| 209 | } |
| 210 | |
| 211 | if ((mAppToken.allDrawn || animating || mAppToken.startingDisplayed) |
| 212 | && animation != null) { |
| 213 | if (!animating) { |
| 214 | if (WindowManagerService.DEBUG_ANIM) Slog.v( |
Craig Mautner | 8a197a4 | 2012-04-24 16:59:36 -0700 | [diff] [blame] | 215 | TAG, "Starting animation in " + mAppToken + |
Craig Mautner | 9339c40 | 2012-11-30 11:23:56 -0800 | [diff] [blame] | 216 | " @ " + currentTime + " scale=" + mService.mTransitionAnimationScale |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 217 | + " allDrawn=" + mAppToken.allDrawn + " animating=" + animating); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 218 | animation.setStartTime(currentTime); |
| 219 | animating = true; |
| 220 | if (thumbnail != null) { |
| 221 | thumbnail.show(); |
| 222 | thumbnailAnimation.setStartTime(currentTime); |
| 223 | } |
| 224 | } |
| 225 | if (stepAnimation(currentTime)) { |
| 226 | // animation isn't over, step any thumbnail and that's |
| 227 | // it for now. |
| 228 | if (thumbnail != null) { |
| 229 | stepThumbnailAnimation(currentTime); |
| 230 | } |
| 231 | return true; |
| 232 | } |
| 233 | } |
| 234 | } else if (animation != null) { |
| 235 | // If the display is frozen, and there is a pending animation, |
| 236 | // clear it and make sure we run the cleanup code. |
| 237 | animating = true; |
| 238 | animation = null; |
| 239 | } |
| 240 | |
| 241 | hasTransformation = false; |
| 242 | |
Craig Mautner | 3de422f | 2012-04-06 18:04:13 -0700 | [diff] [blame] | 243 | if (!animating && animation == null) { |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 244 | return false; |
| 245 | } |
| 246 | |
Craig Mautner | 76a7165 | 2012-09-03 23:23:58 -0700 | [diff] [blame] | 247 | mAnimator.setAppLayoutChanges(this, WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM, |
| 248 | "AppWindowToken"); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 249 | |
| 250 | clearAnimation(); |
| 251 | animating = false; |
| 252 | if (animLayerAdjustment != 0) { |
| 253 | animLayerAdjustment = 0; |
| 254 | updateLayers(); |
| 255 | } |
| 256 | if (mService.mInputMethodTarget != null |
| 257 | && mService.mInputMethodTarget.mAppToken == mAppToken) { |
| 258 | mService.moveInputMethodWindowsIfNeededLocked(true); |
| 259 | } |
| 260 | |
| 261 | if (WindowManagerService.DEBUG_ANIM) Slog.v( |
Craig Mautner | 8a197a4 | 2012-04-24 16:59:36 -0700 | [diff] [blame] | 262 | TAG, "Animation done in " + mAppToken |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 263 | + ": reportedVisible=" + mAppToken.reportedVisible); |
| 264 | |
| 265 | transformation.clear(); |
| 266 | |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 267 | final int N = mAllAppWinAnimators.size(); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 268 | for (int i=0; i<N; i++) { |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 269 | mAllAppWinAnimators.get(i).finishExit(); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 270 | } |
| 271 | mAppToken.updateReportedVisibilityLocked(); |
| 272 | |
| 273 | return false; |
| 274 | } |
| 275 | |
Craig Mautner | bec53f7 | 2012-04-05 11:49:05 -0700 | [diff] [blame] | 276 | boolean showAllWindowsLocked() { |
| 277 | boolean isAnimating = false; |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 278 | final int NW = mAllAppWinAnimators.size(); |
Craig Mautner | bec53f7 | 2012-04-05 11:49:05 -0700 | [diff] [blame] | 279 | for (int i=0; i<NW; i++) { |
Craig Mautner | 322e403 | 2012-07-13 13:35:20 -0700 | [diff] [blame] | 280 | WindowStateAnimator winAnimator = mAllAppWinAnimators.get(i); |
Craig Mautner | fbf378c | 2012-04-23 17:24:21 -0700 | [diff] [blame] | 281 | if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(TAG, |
Craig Mautner | bec53f7 | 2012-04-05 11:49:05 -0700 | [diff] [blame] | 282 | "performing show on: " + winAnimator); |
| 283 | winAnimator.performShowLocked(); |
| 284 | isAnimating |= winAnimator.isAnimating(); |
| 285 | } |
| 286 | return isAnimating; |
| 287 | } |
| 288 | |
Dianne Hackborn | 529e744 | 2012-11-01 14:22:28 -0700 | [diff] [blame] | 289 | void dump(PrintWriter pw, String prefix, boolean dumpAll) { |
| 290 | pw.print(prefix); pw.print("mAppToken="); pw.println(mAppToken); |
| 291 | pw.print(prefix); pw.print("mAnimator="); pw.println(mAnimator); |
| 292 | pw.print(prefix); pw.print("freezingScreen="); pw.print(freezingScreen); |
| 293 | pw.print(" allDrawn="); pw.print(allDrawn); |
| 294 | pw.print(" animLayerAdjustment="); pw.println(animLayerAdjustment); |
Dianne Hackborn | a57c695 | 2013-03-29 14:46:40 -0700 | [diff] [blame] | 295 | if (lastFreezeDuration != 0) { |
| 296 | pw.print(prefix); pw.print("lastFreezeDuration="); |
| 297 | TimeUtils.formatDuration(lastFreezeDuration, pw); pw.println(); |
| 298 | } |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 299 | if (animating || animation != null) { |
Craig Mautner | 9339c40 | 2012-11-30 11:23:56 -0800 | [diff] [blame] | 300 | pw.print(prefix); pw.print("animating="); pw.println(animating); |
Dianne Hackborn | 529e744 | 2012-11-01 14:22:28 -0700 | [diff] [blame] | 301 | pw.print(prefix); pw.print("animation="); pw.println(animation); |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 302 | } |
| 303 | if (hasTransformation) { |
| 304 | pw.print(prefix); pw.print("XForm: "); |
| 305 | transformation.printShortString(pw); |
| 306 | pw.println(); |
| 307 | } |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 308 | if (thumbnail != null) { |
| 309 | pw.print(prefix); pw.print("thumbnail="); pw.print(thumbnail); |
| 310 | pw.print(" x="); pw.print(thumbnailX); |
| 311 | pw.print(" y="); pw.print(thumbnailY); |
| 312 | pw.print(" layer="); pw.println(thumbnailLayer); |
| 313 | pw.print(prefix); pw.print("thumbnailAnimation="); pw.println(thumbnailAnimation); |
| 314 | pw.print(prefix); pw.print("thumbnailTransformation="); |
| 315 | pw.println(thumbnailTransformation.toShortString()); |
| 316 | } |
Dianne Hackborn | 529e744 | 2012-11-01 14:22:28 -0700 | [diff] [blame] | 317 | for (int i=0; i<mAllAppWinAnimators.size(); i++) { |
| 318 | WindowStateAnimator wanim = mAllAppWinAnimators.get(i); |
| 319 | pw.print(prefix); pw.print("App Win Anim #"); pw.print(i); |
| 320 | pw.print(": "); pw.println(wanim); |
| 321 | } |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 322 | } |
Craig Mautner | fbf378c | 2012-04-23 17:24:21 -0700 | [diff] [blame] | 323 | |
| 324 | // This is an animation that does nothing: it just immediately finishes |
| 325 | // itself every time it is called. It is used as a stub animation in cases |
| 326 | // where we want to synchronize multiple things that may be animating. |
| 327 | static final class DummyAnimation extends Animation { |
| 328 | @Override |
| 329 | public boolean getTransformation(long currentTime, Transformation outTransformation) { |
| 330 | return false; |
| 331 | } |
| 332 | } |
| 333 | |
Craig Mautner | 5943163 | 2012-04-04 11:56:44 -0700 | [diff] [blame] | 334 | } |