Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License |
| 15 | */ |
| 16 | |
| 17 | package com.android.server.wm; |
| 18 | |
| 19 | import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; |
| 20 | import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY; |
| 21 | import static android.view.RemoteAnimationTarget.MODE_CLOSING; |
Winson Chung | a89ffed | 2018-01-25 17:46:11 +0000 | [diff] [blame] | 22 | import static android.view.WindowManager.INPUT_CONSUMER_RECENTS_ANIMATION; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 23 | import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; |
| 24 | import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME; |
| 25 | import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM; |
| 26 | |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 27 | import android.app.ActivityManager.TaskSnapshot; |
| 28 | import android.app.WindowConfiguration; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 29 | import android.graphics.Point; |
| 30 | import android.graphics.Rect; |
| 31 | import android.os.Binder; |
Winson Chung | 23aa7b1 | 2018-02-01 11:41:43 -0800 | [diff] [blame] | 32 | import android.os.IBinder; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 33 | import android.os.RemoteException; |
| 34 | import android.os.SystemClock; |
Winson Chung | 23aa7b1 | 2018-02-01 11:41:43 -0800 | [diff] [blame] | 35 | import android.util.ArraySet; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 36 | import android.util.Log; |
| 37 | import android.util.Slog; |
| 38 | import android.view.IRecentsAnimationController; |
| 39 | import android.view.IRecentsAnimationRunner; |
| 40 | import android.view.RemoteAnimationTarget; |
| 41 | import android.view.SurfaceControl; |
| 42 | import android.view.SurfaceControl.Transaction; |
| 43 | import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback; |
Winson Chung | 23aa7b1 | 2018-02-01 11:41:43 -0800 | [diff] [blame] | 44 | import com.google.android.collect.Sets; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 45 | import java.io.PrintWriter; |
| 46 | import java.util.ArrayList; |
| 47 | |
| 48 | /** |
| 49 | * Controls a single instance of the remote driven recents animation. In particular, this allows |
| 50 | * the calling SystemUI to animate the visible task windows as a part of the transition. The remote |
| 51 | * runner is provided an animation controller which allows it to take screenshots and to notify |
| 52 | * window manager when the animation is completed. In addition, window manager may also notify the |
| 53 | * app if it requires the animation to be canceled at any time (ie. due to timeout, etc.) |
| 54 | */ |
| 55 | public class RecentsAnimationController { |
| 56 | private static final String TAG = TAG_WITH_CLASS_NAME ? "RecentsAnimationController" : TAG_WM; |
| 57 | private static final boolean DEBUG = false; |
| 58 | |
| 59 | private final WindowManagerService mService; |
| 60 | private final IRecentsAnimationRunner mRunner; |
| 61 | private final RecentsAnimationCallbacks mCallbacks; |
| 62 | private final ArrayList<TaskAnimationAdapter> mPendingAnimations = new ArrayList<>(); |
Winson Chung | ddf6297 | 2018-02-12 11:10:04 -0800 | [diff] [blame] | 63 | private final int mDisplayId; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 64 | |
| 65 | // The recents component app token that is shown behind the visibile tasks |
| 66 | private AppWindowToken mHomeAppToken; |
Winson Chung | 584d652 | 2018-02-07 23:57:38 +0000 | [diff] [blame] | 67 | private Rect mMinimizedHomeBounds = new Rect(); |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 68 | |
| 69 | // We start the RecentsAnimationController in a pending-start state since we need to wait for |
| 70 | // the wallpaper/activity to draw before we can give control to the handler to start animating |
| 71 | // the visible task surfaces |
| 72 | private boolean mPendingStart = true; |
| 73 | |
| 74 | // Set when the animation has been canceled |
| 75 | private boolean mCanceled = false; |
| 76 | |
| 77 | // Whether or not the input consumer is enabled. The input consumer must be both registered and |
| 78 | // enabled for it to start intercepting touch events. |
| 79 | private boolean mInputConsumerEnabled; |
| 80 | |
Winson Chung | a89ffed | 2018-01-25 17:46:11 +0000 | [diff] [blame] | 81 | private Rect mTmpRect = new Rect(); |
| 82 | |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 83 | public interface RecentsAnimationCallbacks { |
| 84 | void onAnimationFinished(boolean moveHomeToTop); |
| 85 | } |
| 86 | |
| 87 | private final IRecentsAnimationController mController = |
| 88 | new IRecentsAnimationController.Stub() { |
| 89 | |
| 90 | @Override |
| 91 | public TaskSnapshot screenshotTask(int taskId) { |
| 92 | if (DEBUG) Log.d(TAG, "screenshotTask(" + taskId + "): mCanceled=" + mCanceled); |
| 93 | long token = Binder.clearCallingIdentity(); |
| 94 | try { |
| 95 | synchronized (mService.getWindowManagerLock()) { |
| 96 | if (mCanceled) { |
| 97 | return null; |
| 98 | } |
| 99 | for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { |
| 100 | final TaskAnimationAdapter adapter = mPendingAnimations.get(i); |
| 101 | final Task task = adapter.mTask; |
| 102 | if (task.mTaskId == taskId) { |
Winson Chung | 23aa7b1 | 2018-02-01 11:41:43 -0800 | [diff] [blame] | 103 | final TaskSnapshotController snapshotController = |
| 104 | mService.mTaskSnapshotController; |
| 105 | final ArraySet<Task> tasks = Sets.newArraySet(task); |
| 106 | snapshotController.snapshotTasks(tasks); |
| 107 | snapshotController.addSkipClosingAppSnapshotTasks(tasks); |
| 108 | return snapshotController.getSnapshot(taskId, 0 /* userId */, |
| 109 | false /* restoreFromDisk */, false /* reducedResolution */); |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 110 | } |
| 111 | } |
| 112 | return null; |
| 113 | } |
| 114 | } finally { |
| 115 | Binder.restoreCallingIdentity(token); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | @Override |
| 120 | public void finish(boolean moveHomeToTop) { |
| 121 | if (DEBUG) Log.d(TAG, "finish(" + moveHomeToTop + "): mCanceled=" + mCanceled); |
| 122 | long token = Binder.clearCallingIdentity(); |
| 123 | try { |
| 124 | synchronized (mService.getWindowManagerLock()) { |
| 125 | if (mCanceled) { |
| 126 | return; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | // Note, the callback will handle its own synchronization, do not lock on WM lock |
| 131 | // prior to calling the callback |
| 132 | mCallbacks.onAnimationFinished(moveHomeToTop); |
| 133 | } finally { |
| 134 | Binder.restoreCallingIdentity(token); |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | @Override |
| 139 | public void setInputConsumerEnabled(boolean enabled) { |
| 140 | if (DEBUG) Log.d(TAG, "setInputConsumerEnabled(" + enabled + "): mCanceled=" |
| 141 | + mCanceled); |
| 142 | long token = Binder.clearCallingIdentity(); |
| 143 | try { |
| 144 | synchronized (mService.getWindowManagerLock()) { |
| 145 | if (mCanceled) { |
| 146 | return; |
| 147 | } |
| 148 | |
| 149 | mInputConsumerEnabled = enabled; |
| 150 | mService.mInputMonitor.updateInputWindowsLw(true /*force*/); |
| 151 | mService.scheduleAnimationLocked(); |
| 152 | } |
| 153 | } finally { |
| 154 | Binder.restoreCallingIdentity(token); |
| 155 | } |
| 156 | } |
| 157 | }; |
| 158 | |
| 159 | /** |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 160 | * @param remoteAnimationRunner The remote runner which should be notified when the animation is |
| 161 | * ready to start or has been canceled |
| 162 | * @param callbacks Callbacks to be made when the animation finishes |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 163 | */ |
| 164 | RecentsAnimationController(WindowManagerService service, |
| 165 | IRecentsAnimationRunner remoteAnimationRunner, RecentsAnimationCallbacks callbacks, |
| 166 | int displayId) { |
| 167 | mService = service; |
| 168 | mRunner = remoteAnimationRunner; |
| 169 | mCallbacks = callbacks; |
Winson Chung | ddf6297 | 2018-02-12 11:10:04 -0800 | [diff] [blame] | 170 | mDisplayId = displayId; |
| 171 | } |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 172 | |
Winson Chung | ddf6297 | 2018-02-12 11:10:04 -0800 | [diff] [blame] | 173 | /** |
| 174 | * Initializes the recents animation controller. This is a separate call from the constructor |
| 175 | * because it may call cancelAnimation() which needs to properly clean up the controller |
| 176 | * in the window manager. |
| 177 | */ |
| 178 | public void initialize() { |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 179 | // Make leashes for each of the visible tasks and add it to the recents animation to be |
| 180 | // started |
Winson Chung | ddf6297 | 2018-02-12 11:10:04 -0800 | [diff] [blame] | 181 | final DisplayContent dc = mService.mRoot.getDisplayContent(mDisplayId); |
| 182 | final ArrayList<Task> visibleTasks = dc.getVisibleTasks(); |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 183 | final int taskCount = visibleTasks.size(); |
| 184 | for (int i = 0; i < taskCount; i++) { |
| 185 | final Task task = visibleTasks.get(i); |
| 186 | final WindowConfiguration config = task.getWindowConfiguration(); |
| 187 | if (config.tasksAreFloating() |
| 188 | || config.getWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY |
| 189 | || config.getActivityType() == ACTIVITY_TYPE_HOME) { |
| 190 | continue; |
| 191 | } |
| 192 | addAnimation(task); |
| 193 | } |
| 194 | |
Winson Chung | ddf6297 | 2018-02-12 11:10:04 -0800 | [diff] [blame] | 195 | // Skip the animation if there is nothing to animate |
| 196 | if (mPendingAnimations.isEmpty()) { |
| 197 | cancelAnimation(); |
| 198 | return; |
| 199 | } |
| 200 | |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 201 | // Adjust the wallpaper visibility for the showing home activity |
| 202 | final AppWindowToken recentsComponentAppToken = |
| 203 | dc.getHomeStack().getTopChild().getTopFullscreenAppToken(); |
| 204 | if (recentsComponentAppToken != null) { |
| 205 | if (DEBUG) Log.d(TAG, "setHomeApp(" + recentsComponentAppToken.getName() + ")"); |
| 206 | mHomeAppToken = recentsComponentAppToken; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 207 | if (recentsComponentAppToken.windowsCanBeWallpaperTarget()) { |
| 208 | dc.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER; |
| 209 | dc.setLayoutNeeded(); |
| 210 | } |
| 211 | } |
| 212 | |
Winson Chung | 584d652 | 2018-02-07 23:57:38 +0000 | [diff] [blame] | 213 | // Save the minimized home height |
| 214 | dc.getDockedDividerController().getHomeStackBoundsInDockedMode(mMinimizedHomeBounds); |
| 215 | |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 216 | mService.mWindowPlacerLocked.performSurfacePlacement(); |
| 217 | } |
| 218 | |
| 219 | private void addAnimation(Task task) { |
| 220 | if (DEBUG) Log.d(TAG, "addAnimation(" + task.getName() + ")"); |
| 221 | final SurfaceAnimator anim = new SurfaceAnimator(task, null /* animationFinishedCallback */, |
Chavi Weingarten | b736e32 | 2018-02-23 00:27:54 +0000 | [diff] [blame^] | 222 | mService); |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 223 | final TaskAnimationAdapter taskAdapter = new TaskAnimationAdapter(task); |
| 224 | anim.startAnimation(task.getPendingTransaction(), taskAdapter, false /* hidden */); |
| 225 | task.commitPendingTransaction(); |
| 226 | mPendingAnimations.add(taskAdapter); |
| 227 | } |
| 228 | |
| 229 | void startAnimation() { |
Winson Chung | ddf6297 | 2018-02-12 11:10:04 -0800 | [diff] [blame] | 230 | if (DEBUG) Log.d(TAG, "startAnimation(): mPendingStart=" + mPendingStart |
| 231 | + " mCanceled=" + mCanceled); |
| 232 | if (!mPendingStart || mCanceled) { |
| 233 | // Skip starting if we've already started or canceled the animation |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 234 | return; |
| 235 | } |
| 236 | try { |
| 237 | final RemoteAnimationTarget[] appAnimations = |
| 238 | new RemoteAnimationTarget[mPendingAnimations.size()]; |
| 239 | for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { |
| 240 | appAnimations[i] = mPendingAnimations.get(i).createRemoteAnimationApp(); |
| 241 | } |
| 242 | mPendingStart = false; |
Winson Chung | 584d652 | 2018-02-07 23:57:38 +0000 | [diff] [blame] | 243 | |
| 244 | final Rect minimizedHomeBounds = |
| 245 | mHomeAppToken != null && mHomeAppToken.inSplitScreenSecondaryWindowingMode() |
| 246 | ? mMinimizedHomeBounds : null; |
| 247 | final Rect contentInsets = |
| 248 | mHomeAppToken != null && mHomeAppToken.findMainWindow() != null |
| 249 | ? mHomeAppToken.findMainWindow().mContentInsets : null; |
| 250 | mRunner.onAnimationStart_New(mController, appAnimations, contentInsets, |
| 251 | minimizedHomeBounds); |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 252 | } catch (RemoteException e) { |
| 253 | Slog.e(TAG, "Failed to start recents animation", e); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | void cancelAnimation() { |
| 258 | if (DEBUG) Log.d(TAG, "cancelAnimation()"); |
| 259 | if (mCanceled) { |
| 260 | // We've already canceled the animation |
| 261 | return; |
| 262 | } |
| 263 | mCanceled = true; |
| 264 | try { |
| 265 | mRunner.onAnimationCanceled(); |
| 266 | } catch (RemoteException e) { |
| 267 | Slog.e(TAG, "Failed to cancel recents animation", e); |
| 268 | } |
| 269 | |
| 270 | // Clean up and return to the previous app |
| 271 | mCallbacks.onAnimationFinished(false /* moveHomeToTop */); |
| 272 | } |
| 273 | |
| 274 | void cleanupAnimation() { |
| 275 | if (DEBUG) Log.d(TAG, "cleanupAnimation(): mPendingAnimations=" |
| 276 | + mPendingAnimations.size()); |
| 277 | for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { |
| 278 | final TaskAnimationAdapter adapter = mPendingAnimations.get(i); |
| 279 | adapter.mCapturedFinishCallback.onAnimationFinished(adapter); |
| 280 | } |
| 281 | mPendingAnimations.clear(); |
| 282 | |
| 283 | mService.mInputMonitor.updateInputWindowsLw(true /*force*/); |
Winson Chung | a89ffed | 2018-01-25 17:46:11 +0000 | [diff] [blame] | 284 | mService.destroyInputConsumer(INPUT_CONSUMER_RECENTS_ANIMATION); |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 285 | } |
| 286 | |
| 287 | void checkAnimationReady(WallpaperController wallpaperController) { |
| 288 | if (mPendingStart) { |
| 289 | final boolean wallpaperReady = !isHomeAppOverWallpaper() |
| 290 | || (wallpaperController.getWallpaperTarget() != null |
| 291 | && wallpaperController.wallpaperTransitionReady()); |
| 292 | if (wallpaperReady) { |
| 293 | mService.getRecentsAnimationController().startAnimation(); |
| 294 | } |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | boolean isWallpaperVisible(WindowState w) { |
| 299 | return w != null && w.mAppToken != null && mHomeAppToken == w.mAppToken |
| 300 | && isHomeAppOverWallpaper(); |
| 301 | } |
| 302 | |
Winson Chung | a89ffed | 2018-01-25 17:46:11 +0000 | [diff] [blame] | 303 | boolean hasInputConsumerForApp(AppWindowToken appToken) { |
| 304 | return mInputConsumerEnabled && isAnimatingApp(appToken); |
| 305 | } |
| 306 | |
| 307 | boolean updateInputConsumerForApp(InputConsumerImpl recentsAnimationInputConsumer, |
| 308 | boolean hasFocus) { |
| 309 | // Update the input consumer touchable region to match the home app main window |
| 310 | final WindowState homeAppMainWindow = mHomeAppToken != null |
| 311 | ? mHomeAppToken.findMainWindow() |
| 312 | : null; |
| 313 | if (homeAppMainWindow != null) { |
| 314 | homeAppMainWindow.getBounds(mTmpRect); |
| 315 | recentsAnimationInputConsumer.mWindowHandle.hasFocus = hasFocus; |
| 316 | recentsAnimationInputConsumer.mWindowHandle.touchableRegion.set(mTmpRect); |
| 317 | return true; |
| 318 | } |
| 319 | return false; |
| 320 | } |
| 321 | |
| 322 | private boolean isHomeAppOverWallpaper() { |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 323 | if (mHomeAppToken == null) { |
| 324 | return false; |
| 325 | } |
| 326 | return mHomeAppToken.windowsCanBeWallpaperTarget(); |
| 327 | } |
| 328 | |
Winson Chung | a89ffed | 2018-01-25 17:46:11 +0000 | [diff] [blame] | 329 | private boolean isAnimatingApp(AppWindowToken appToken) { |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 330 | for (int i = mPendingAnimations.size() - 1; i >= 0; i--) { |
| 331 | final Task task = mPendingAnimations.get(i).mTask; |
| 332 | for (int j = task.getChildCount() - 1; j >= 0; j--) { |
| 333 | final AppWindowToken app = task.getChildAt(j); |
| 334 | if (app == appToken) { |
| 335 | return true; |
| 336 | } |
| 337 | } |
| 338 | } |
| 339 | return false; |
| 340 | } |
| 341 | |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 342 | private class TaskAnimationAdapter implements AnimationAdapter { |
| 343 | |
| 344 | private Task mTask; |
| 345 | private SurfaceControl mCapturedLeash; |
| 346 | private OnAnimationFinishedCallback mCapturedFinishCallback; |
| 347 | |
| 348 | TaskAnimationAdapter(Task task) { |
| 349 | mTask = task; |
| 350 | } |
| 351 | |
| 352 | RemoteAnimationTarget createRemoteAnimationApp() { |
Winson Chung | 584d652 | 2018-02-07 23:57:38 +0000 | [diff] [blame] | 353 | final Point position = new Point(); |
| 354 | final Rect bounds = new Rect(); |
| 355 | final WindowContainer container = mTask.getParent(); |
| 356 | container.getRelativePosition(position); |
| 357 | container.getBounds(bounds); |
| 358 | final WindowState mainWindow = mTask.getTopVisibleAppMainWindow(); |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 359 | return new RemoteAnimationTarget(mTask.mTaskId, MODE_CLOSING, mCapturedLeash, |
Winson Chung | 584d652 | 2018-02-07 23:57:38 +0000 | [diff] [blame] | 360 | !mTask.fillsParent(), mainWindow.mWinAnimator.mLastClipRect, |
| 361 | mainWindow.mContentInsets, mTask.getPrefixOrderIndex(), position, bounds, |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 362 | mTask.getWindowConfiguration()); |
| 363 | } |
| 364 | |
| 365 | @Override |
| 366 | public boolean getDetachWallpaper() { |
| 367 | return false; |
| 368 | } |
| 369 | |
| 370 | @Override |
Jorim Jaggi | 82c1786 | 2018-02-21 17:50:18 +0100 | [diff] [blame] | 371 | public boolean getShowWallpaper() { |
| 372 | return false; |
| 373 | } |
| 374 | |
| 375 | @Override |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 376 | public int getBackgroundColor() { |
| 377 | return 0; |
| 378 | } |
| 379 | |
| 380 | @Override |
| 381 | public void startAnimation(SurfaceControl animationLeash, Transaction t, |
| 382 | OnAnimationFinishedCallback finishCallback) { |
| 383 | mCapturedLeash = animationLeash; |
| 384 | mCapturedFinishCallback = finishCallback; |
| 385 | } |
| 386 | |
| 387 | @Override |
| 388 | public void onAnimationCancelled(SurfaceControl animationLeash) { |
| 389 | cancelAnimation(); |
| 390 | } |
| 391 | |
| 392 | @Override |
| 393 | public long getDurationHint() { |
| 394 | return 0; |
| 395 | } |
| 396 | |
| 397 | @Override |
| 398 | public long getStatusBarTransitionsStartTime() { |
| 399 | return SystemClock.uptimeMillis(); |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | public void dump(PrintWriter pw, String prefix) { |
| 404 | final String innerPrefix = prefix + " "; |
| 405 | pw.print(prefix); pw.println(RecentsAnimationController.class.getSimpleName() + ":"); |
| 406 | pw.print(innerPrefix); pw.println("mPendingStart=" + mPendingStart); |
| 407 | pw.print(innerPrefix); pw.println("mHomeAppToken=" + mHomeAppToken); |
| 408 | } |
| 409 | } |