blob: d1111f70346a3b49b95efc2d3f368bd17fd55869 [file] [log] [blame]
Craig Mautnerb1fd65c02013-02-05 13:34:57 -08001/*
2 * Copyright (C) 2013 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
17package com.android.server.wm;
18
Filip Gruszczynski466f3212015-09-21 17:57:57 -070019import static android.app.ActivityManager.DOCKED_STACK_ID;
Craig Mautner42bf39e2014-02-21 16:46:22 -080020import static com.android.server.wm.WindowManagerService.TAG;
Wale Ogunwalee4a0c572015-06-30 08:40:31 -070021import static com.android.server.wm.WindowManagerService.DEBUG_RESIZE;
Craig Mautnere3119b72015-01-20 15:02:36 -080022import static com.android.server.wm.WindowManagerService.DEBUG_STACK;
Stefan Kuhne234dbf82015-08-13 09:44:28 -070023import static android.app.ActivityManager.FREEFORM_WORKSPACE_STACK_ID;
Craig Mautner42bf39e2014-02-21 16:46:22 -080024
Wale Ogunwalee4a0c572015-06-30 08:40:31 -070025import android.content.res.Configuration;
26import android.graphics.Rect;
Craig Mautner2c2549c2013-11-12 08:31:15 -080027import android.util.EventLog;
Craig Mautner42bf39e2014-02-21 16:46:22 -080028import android.util.Slog;
Wale Ogunwalee4a0c572015-06-30 08:40:31 -070029import android.util.SparseArray;
30import android.util.TypedValue;
31import android.view.DisplayInfo;
32import android.view.Surface;
33
Craig Mautnere3119b72015-01-20 15:02:36 -080034import com.android.server.EventLogTags;
Craig Mautner2c2549c2013-11-12 08:31:15 -080035
Wale Ogunwalee4a0c572015-06-30 08:40:31 -070036import java.io.PrintWriter;
37import java.util.ArrayList;
38
39class Task implements DimLayer.DimLayerUser {
40 /** Amount of time in milliseconds to animate the dim surface from one value to another,
41 * when no window animation is driving it. */
42 private static final int DEFAULT_DIM_DURATION = 200;
43
Wale Ogunwale2cc92f52015-09-09 13:12:10 -070044 // Return value from {@link setBounds} indicating no change was made to the Task bounds.
45 static final int BOUNDS_CHANGE_NONE = 0;
46 // Return value from {@link setBounds} indicating the position of the Task bounds changed.
47 static final int BOUNDS_CHANGE_POSITION = 1;
48 // Return value from {@link setBounds} indicating the size of the Task bounds changed.
49 static final int BOUNDS_CHANGE_SIZE = 1 << 1;
50
Craig Mautnerc00204b2013-03-05 15:02:14 -080051 TaskStack mStack;
Craig Mautner05d6272ba2013-02-11 09:39:27 -080052 final AppTokenList mAppTokens = new AppTokenList();
Craig Mautner83162a92015-01-26 14:43:30 -080053 final int mTaskId;
Craig Mautnerac6f8432013-07-17 13:24:59 -070054 final int mUserId;
Craig Mautner9ef471f2014-02-07 13:11:47 -080055 boolean mDeferRemoval = false;
Craig Mautnere3119b72015-01-20 15:02:36 -080056 final WindowManagerService mService;
Craig Mautnerb1fd65c02013-02-05 13:34:57 -080057
Wale Ogunwalee4a0c572015-06-30 08:40:31 -070058 // Content limits relative to the DisplayContent this sits in.
59 private Rect mBounds = new Rect();
60
61 // Device rotation as of the last time {@link #mBounds} was set.
62 int mRotation;
63
64 // Whether mBounds is fullscreen
65 private boolean mFullscreen = true;
66
67 // Contains configurations settings that are different from the global configuration due to
68 // stack specific operations. E.g. {@link #setBounds}.
69 Configuration mOverrideConfig;
70
71 // For comparison with DisplayContent bounds.
72 private Rect mTmpRect = new Rect();
73 // For handling display rotations.
74 private Rect mTmpRect2 = new Rect();
75
Chong Zhang3005e752015-09-18 18:46:28 -070076 // Whether the task is currently being drag-resized
77 private boolean mDragResizing;
78
Wale Ogunwalee4a0c572015-06-30 08:40:31 -070079 // The particular window with FLAG_DIM_BEHIND set. If null, hide mDimLayer.
80 WindowStateAnimator mDimWinAnimator;
81 // Used to support {@link android.view.WindowManager.LayoutParams#FLAG_DIM_BEHIND}
82 private DimLayer mDimLayer;
83 // Set to false at the start of performLayoutAndPlaceSurfaces. If it is still false by the end
84 // then stop any dimming.
85 private boolean mContinueDimming;
86 // Shared dim layer for fullscreen tasks. {@link #mDimLayer} will point to this instead
87 // of creating a new object per fullscreen task on a display.
88 private static final SparseArray<DimLayer> sSharedFullscreenDimLayers = new SparseArray<>();
89
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -070090 Task(int taskId, TaskStack stack, int userId, WindowManagerService service, Rect bounds,
91 Configuration config) {
Craig Mautner83162a92015-01-26 14:43:30 -080092 mTaskId = taskId;
Craig Mautnerc00204b2013-03-05 15:02:14 -080093 mStack = stack;
Craig Mautnerac6f8432013-07-17 13:24:59 -070094 mUserId = userId;
Craig Mautnere3119b72015-01-20 15:02:36 -080095 mService = service;
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -070096 setBounds(bounds, config);
Craig Mautnerc00204b2013-03-05 15:02:14 -080097 }
98
99 DisplayContent getDisplayContent() {
100 return mStack.getDisplayContent();
101 }
102
103 void addAppToken(int addPos, AppWindowToken wtoken) {
Craig Mautner42bf39e2014-02-21 16:46:22 -0800104 final int lastPos = mAppTokens.size();
Craig Mautner83162a92015-01-26 14:43:30 -0800105 if (addPos >= lastPos) {
106 addPos = lastPos;
107 } else {
108 for (int pos = 0; pos < lastPos && pos < addPos; ++pos) {
109 if (mAppTokens.get(pos).removed) {
110 // addPos assumes removed tokens are actually gone.
111 ++addPos;
112 }
Craig Mautner01f79cf2014-08-27 09:56:02 -0700113 }
Craig Mautner42bf39e2014-02-21 16:46:22 -0800114 }
Craig Mautnerc00204b2013-03-05 15:02:14 -0800115 mAppTokens.add(addPos, wtoken);
Craig Mautner83162a92015-01-26 14:43:30 -0800116 wtoken.mTask = this;
Craig Mautner42bf39e2014-02-21 16:46:22 -0800117 mDeferRemoval = false;
Craig Mautnerc00204b2013-03-05 15:02:14 -0800118 }
119
Craig Mautnere3119b72015-01-20 15:02:36 -0800120 void removeLocked() {
121 if (!mAppTokens.isEmpty() && mStack.isAnimating()) {
Craig Mautner83162a92015-01-26 14:43:30 -0800122 if (DEBUG_STACK) Slog.i(TAG, "removeTask: deferring removing taskId=" + mTaskId);
Craig Mautnere3119b72015-01-20 15:02:36 -0800123 mDeferRemoval = true;
124 return;
125 }
Craig Mautner83162a92015-01-26 14:43:30 -0800126 if (DEBUG_STACK) Slog.i(TAG, "removeTask: removing taskId=" + mTaskId);
127 EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, mTaskId, "removeTask");
Craig Mautnere3119b72015-01-20 15:02:36 -0800128 mDeferRemoval = false;
129 mStack.removeTask(this);
Craig Mautner83162a92015-01-26 14:43:30 -0800130 mService.mTaskIdToTask.delete(mTaskId);
Craig Mautnere3119b72015-01-20 15:02:36 -0800131 }
132
Wale Ogunwale53a29a92015-02-23 15:42:52 -0800133 void moveTaskToStack(TaskStack stack, boolean toTop) {
134 if (stack == mStack) {
135 return;
136 }
137 if (DEBUG_STACK) Slog.i(TAG, "moveTaskToStack: removing taskId=" + mTaskId
138 + " from stack=" + mStack);
Wale Ogunwale000957c2015-04-03 08:19:12 -0700139 EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, mTaskId, "moveTask");
Wale Ogunwale53a29a92015-02-23 15:42:52 -0800140 if (mStack != null) {
141 mStack.removeTask(this);
142 }
143 stack.addTask(this, toTop);
144 }
145
Wale Ogunwaleddc1cb22015-07-25 19:23:04 -0700146 void positionTaskInStack(TaskStack stack, int position) {
147 if (mStack != null && stack != mStack) {
148 if (DEBUG_STACK) Slog.i(TAG, "positionTaskInStack: removing taskId=" + mTaskId
149 + " from stack=" + mStack);
150 EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, mTaskId, "moveTask");
151 mStack.removeTask(this);
152 }
153 stack.positionTask(this, position, showForAllUsers());
154 }
155
Craig Mautnerc00204b2013-03-05 15:02:14 -0800156 boolean removeAppToken(AppWindowToken wtoken) {
Craig Mautner42bf39e2014-02-21 16:46:22 -0800157 boolean removed = mAppTokens.remove(wtoken);
Craig Mautnerc00204b2013-03-05 15:02:14 -0800158 if (mAppTokens.size() == 0) {
Wale Ogunwale000957c2015-04-03 08:19:12 -0700159 EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, mTaskId,
Craig Mautner2c2549c2013-11-12 08:31:15 -0800160 "removeAppToken: last token");
Craig Mautnere3119b72015-01-20 15:02:36 -0800161 if (mDeferRemoval) {
162 removeLocked();
163 }
Craig Mautnerc00204b2013-03-05 15:02:14 -0800164 }
Craig Mautner83162a92015-01-26 14:43:30 -0800165 wtoken.mTask = null;
166 /* Leave mTaskId for now, it might be useful for debug
167 wtoken.mTaskId = -1;
168 */
Craig Mautner42bf39e2014-02-21 16:46:22 -0800169 return removed;
Craig Mautnerb1fd65c02013-02-05 13:34:57 -0800170 }
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800171
Craig Mautnercbd84af2014-10-22 13:21:22 -0700172 void setSendingToBottom(boolean toBottom) {
173 for (int appTokenNdx = 0; appTokenNdx < mAppTokens.size(); appTokenNdx++) {
174 mAppTokens.get(appTokenNdx).sendingToBottom = toBottom;
175 }
176 }
177
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700178 /** Set the task bounds. Passing in null sets the bounds to fullscreen. */
Wale Ogunwale2cc92f52015-09-09 13:12:10 -0700179 int setBounds(Rect bounds, Configuration config) {
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -0700180 if (config == null) {
181 config = Configuration.EMPTY;
182 }
183 if (bounds == null && !Configuration.EMPTY.equals(config)) {
184 throw new IllegalArgumentException("null bounds but non empty configuration: "
185 + config);
186 }
187 if (bounds != null && Configuration.EMPTY.equals(config)) {
188 throw new IllegalArgumentException("non null bounds, but empty configuration");
189 }
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700190 boolean oldFullscreen = mFullscreen;
191 int rotation = Surface.ROTATION_0;
192 final DisplayContent displayContent = mStack.getDisplayContent();
193 if (displayContent != null) {
194 displayContent.getLogicalDisplayRect(mTmpRect);
195 rotation = displayContent.getDisplayInfo().rotation;
196 if (bounds == null) {
197 bounds = mTmpRect;
198 mFullscreen = true;
199 } else {
Stefan Kuhne234dbf82015-08-13 09:44:28 -0700200 if (mStack.mStackId != FREEFORM_WORKSPACE_STACK_ID || bounds.isEmpty()) {
201 // ensure bounds are entirely within the display rect
202 if (!bounds.intersect(mTmpRect)) {
203 // Can't set bounds outside the containing display...Sorry!
Wale Ogunwale2cc92f52015-09-09 13:12:10 -0700204 return BOUNDS_CHANGE_NONE;
Stefan Kuhne234dbf82015-08-13 09:44:28 -0700205 }
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700206 }
207 mFullscreen = mTmpRect.equals(bounds);
208 }
209 }
210
211 if (bounds == null) {
212 // Can't set to fullscreen if we don't have a display to get bounds from...
Wale Ogunwale2cc92f52015-09-09 13:12:10 -0700213 return BOUNDS_CHANGE_NONE;
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700214 }
215 if (mBounds.equals(bounds) && oldFullscreen == mFullscreen && mRotation == rotation) {
Wale Ogunwale2cc92f52015-09-09 13:12:10 -0700216 return BOUNDS_CHANGE_NONE;
217 }
218
219 int boundsChange = BOUNDS_CHANGE_NONE;
220 if (mBounds.left != bounds.left || mBounds.right != bounds.right) {
221 boundsChange |= BOUNDS_CHANGE_POSITION;
222 }
223 if (mBounds.width() != bounds.width() || mBounds.height() != bounds.height()) {
224 boundsChange |= BOUNDS_CHANGE_SIZE;
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700225 }
226
227 mBounds.set(bounds);
228 mRotation = rotation;
229 updateDimLayer();
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -0700230 mOverrideConfig = mFullscreen ? Configuration.EMPTY : config;
Wale Ogunwale2cc92f52015-09-09 13:12:10 -0700231 return boundsChange;
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700232 }
233
Chong Zhang87b21722015-09-21 15:39:51 -0700234 boolean resizeLocked(Rect bounds, Configuration configuration, boolean forced) {
Chong Zhang3005e752015-09-18 18:46:28 -0700235 int boundsChanged = setBounds(bounds, configuration);
Chong Zhang87b21722015-09-21 15:39:51 -0700236 if (forced) {
Chong Zhang3005e752015-09-18 18:46:28 -0700237 boundsChanged |= BOUNDS_CHANGE_SIZE;
Chong Zhang3005e752015-09-18 18:46:28 -0700238 }
239 if (boundsChanged == BOUNDS_CHANGE_NONE) {
240 return false;
241 }
242 if ((boundsChanged & BOUNDS_CHANGE_SIZE) == BOUNDS_CHANGE_SIZE) {
243 resizeWindows();
244 }
245 return true;
246 }
247
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700248 void getBounds(Rect out) {
249 out.set(mBounds);
250 }
251
Chong Zhang3005e752015-09-18 18:46:28 -0700252 void setDragResizing(boolean dragResizing) {
Chong Zhang3005e752015-09-18 18:46:28 -0700253 mDragResizing = dragResizing;
254 }
255
256 boolean isDragResizing() {
257 return mDragResizing;
258 }
259
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700260 void updateDisplayInfo(final DisplayContent displayContent) {
261 if (displayContent == null) {
262 return;
263 }
264 if (mFullscreen) {
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -0700265 setBounds(null, Configuration.EMPTY);
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700266 return;
267 }
268 final int newRotation = displayContent.getDisplayInfo().rotation;
269 if (mRotation == newRotation) {
270 return;
271 }
272
273 // Device rotation changed. We don't want the task to move around on the screen when
274 // this happens, so update the task bounds so it stays in the same place.
Wale Ogunwale94744212015-09-21 19:01:47 -0700275 mTmpRect2.set(mBounds);
276 displayContent.rotateBounds(mRotation, newRotation, mTmpRect2);
Filip Gruszczynskiebcc8752015-08-25 16:51:05 -0700277 setBounds(mTmpRect2, mOverrideConfig);
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700278 }
279
280 /** Updates the dim layer bounds, recreating it if needed. */
281 private void updateDimLayer() {
282 DimLayer newDimLayer;
283 final boolean previousFullscreen =
284 mDimLayer != null && sSharedFullscreenDimLayers.indexOfValue(mDimLayer) > -1;
285 final int displayId = mStack.getDisplayContent().getDisplayId();
286 if (mFullscreen) {
287 if (previousFullscreen) {
288 // Nothing to do here...
289 return;
290 }
291 // Use shared fullscreen dim layer
292 newDimLayer = sSharedFullscreenDimLayers.get(displayId);
293 if (newDimLayer == null) {
294 if (mDimLayer != null) {
295 // Re-purpose the previous dim layer.
296 newDimLayer = mDimLayer;
297 } else {
298 // Create new full screen dim layer.
299 newDimLayer = new DimLayer(mService, this, displayId);
300 }
301 newDimLayer.setBounds(mBounds);
302 sSharedFullscreenDimLayers.put(displayId, newDimLayer);
303 } else if (mDimLayer != null) {
304 mDimLayer.destroySurface();
305 }
306 } else {
307 newDimLayer = (mDimLayer == null || previousFullscreen)
308 ? new DimLayer(mService, this, displayId) : mDimLayer;
309 newDimLayer.setBounds(mBounds);
310 }
311 mDimLayer = newDimLayer;
312 }
313
314 boolean animateDimLayers() {
315 final int dimLayer;
316 final float dimAmount;
317 if (mDimWinAnimator == null) {
318 dimLayer = mDimLayer.getLayer();
319 dimAmount = 0;
320 } else {
321 dimLayer = mDimWinAnimator.mAnimLayer - WindowManagerService.LAYER_OFFSET_DIM;
322 dimAmount = mDimWinAnimator.mWin.mAttrs.dimAmount;
323 }
324 final float targetAlpha = mDimLayer.getTargetAlpha();
325 if (targetAlpha != dimAmount) {
326 if (mDimWinAnimator == null) {
327 mDimLayer.hide(DEFAULT_DIM_DURATION);
328 } else {
329 long duration = (mDimWinAnimator.mAnimating && mDimWinAnimator.mAnimation != null)
330 ? mDimWinAnimator.mAnimation.computeDurationHint()
331 : DEFAULT_DIM_DURATION;
332 if (targetAlpha > dimAmount) {
333 duration = getDimBehindFadeDuration(duration);
334 }
335 mDimLayer.show(dimLayer, dimAmount, duration);
336 }
337 } else if (mDimLayer.getLayer() != dimLayer) {
338 mDimLayer.setLayer(dimLayer);
339 }
340 if (mDimLayer.isAnimating()) {
341 if (!mService.okToDisplay()) {
342 // Jump to the end of the animation.
343 mDimLayer.show();
344 } else {
345 return mDimLayer.stepAnimation();
346 }
347 }
348 return false;
349 }
350
351 private long getDimBehindFadeDuration(long duration) {
352 TypedValue tv = new TypedValue();
353 mService.mContext.getResources().getValue(
354 com.android.internal.R.fraction.config_dimBehindFadeDuration, tv, true);
355 if (tv.type == TypedValue.TYPE_FRACTION) {
356 duration = (long)tv.getFraction(duration, duration);
357 } else if (tv.type >= TypedValue.TYPE_FIRST_INT && tv.type <= TypedValue.TYPE_LAST_INT) {
358 duration = tv.data;
359 }
360 return duration;
361 }
362
363 void clearContinueDimming() {
364 mContinueDimming = false;
365 }
366
367 void setContinueDimming() {
368 mContinueDimming = true;
369 }
370
371 boolean getContinueDimming() {
372 return mContinueDimming;
373 }
374
375 boolean isDimming() {
376 return mDimLayer.isDimming();
377 }
378
379 boolean isDimming(WindowStateAnimator winAnimator) {
380 return mDimWinAnimator == winAnimator && isDimming();
381 }
382
383 void startDimmingIfNeeded(WindowStateAnimator newWinAnimator) {
384 // Only set dim params on the highest dimmed layer.
385 // Don't turn on for an unshown surface, or for any layer but the highest dimmed layer.
386 if (newWinAnimator.mSurfaceShown && (mDimWinAnimator == null
387 || !mDimWinAnimator.mSurfaceShown
388 || mDimWinAnimator.mAnimLayer < newWinAnimator.mAnimLayer)) {
389 mDimWinAnimator = newWinAnimator;
390 if (mDimWinAnimator.mWin.mAppToken == null
391 && !mFullscreen && mStack.getDisplayContent() != null) {
392 // Dim should cover the entire screen for system windows.
393 mStack.getDisplayContent().getLogicalDisplayRect(mTmpRect);
394 mDimLayer.setBounds(mTmpRect);
395 }
396 }
397 }
398
399 void stopDimmingIfNeeded() {
400 if (!mContinueDimming && isDimming()) {
401 mDimWinAnimator = null;
402 mDimLayer.setBounds(mBounds);
403 }
404 }
405
406 void close() {
407 if (mDimLayer != null) {
408 mDimLayer.destroySurface();
409 mDimLayer = null;
410 }
411 }
412
413 void resizeWindows() {
414 final ArrayList<WindowState> resizingWindows = mService.mResizingWindows;
415 for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) {
416 final ArrayList<WindowState> windows = mAppTokens.get(activityNdx).allAppWindows;
417 for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
418 final WindowState win = windows.get(winNdx);
419 if (!resizingWindows.contains(win)) {
420 if (DEBUG_RESIZE) Slog.d(TAG, "setBounds: Resizing " + win);
421 resizingWindows.add(win);
422 }
423 }
424 }
425 }
426
Wale Ogunwale6dfdfd62015-04-15 12:01:38 -0700427 boolean showForAllUsers() {
Wale Ogunwale3fcb4a82015-04-06 14:00:13 -0700428 final int tokensCount = mAppTokens.size();
Wale Ogunwale6dfdfd62015-04-15 12:01:38 -0700429 return (tokensCount != 0) && mAppTokens.get(tokensCount - 1).showForAllUsers;
Wale Ogunwale3fcb4a82015-04-06 14:00:13 -0700430 }
431
Chong Zhang09b21ef2015-09-14 10:20:21 -0700432 boolean inFreeformWorkspace() {
433 return mStack != null && mStack.mStackId == FREEFORM_WORKSPACE_STACK_ID;
434 }
435
Filip Gruszczynski466f3212015-09-21 17:57:57 -0700436 boolean inDockedWorkspace() {
437 return mStack != null && mStack.mStackId == DOCKED_STACK_ID;
438 }
439
Chong Zhang9184ec62015-09-24 12:32:21 -0700440 WindowState getTopAppMainWindow() {
441 final int tokensCount = mAppTokens.size();
442 return tokensCount > 0 ? mAppTokens.get(tokensCount - 1).findMainWindow() : null;
443 }
444
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800445 @Override
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700446 public boolean isFullscreen() {
447 return mFullscreen;
448 }
449
450 @Override
451 public DisplayInfo getDisplayInfo() {
452 return mStack.getDisplayContent().getDisplayInfo();
453 }
454
455 @Override
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800456 public String toString() {
Craig Mautner83162a92015-01-26 14:43:30 -0800457 return "{taskId=" + mTaskId + " appTokens=" + mAppTokens + " mdr=" + mDeferRemoval + "}";
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800458 }
Wale Ogunwalee4a0c572015-06-30 08:40:31 -0700459
460 public void printTo(String prefix, PrintWriter pw) {
461 pw.print(prefix); pw.print("taskId="); pw.print(mTaskId);
462 pw.print(prefix); pw.print("appTokens="); pw.print(mAppTokens);
463 pw.print(prefix); pw.print("mdr="); pw.println(mDeferRemoval);
464 if (mDimLayer.isDimming()) {
465 pw.print(prefix); pw.println("mDimLayer:");
466 mDimLayer.printTo(prefix + " ", pw);
467 pw.print(prefix); pw.print("mDimWinAnimator="); pw.println(mDimWinAnimator);
468 } else {
469 pw.println();
470 }
471 }
Craig Mautnerb1fd65c02013-02-05 13:34:57 -0800472}