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