FileDocCategorySizeDatePackage
Task.javaAPI DocAndroid 5.1 API2326Thu Mar 12 22:22:42 GMT 2015com.android.server.wm

Task

public class Task extends Object

Fields Summary
TaskStack
mStack
final AppTokenList
mAppTokens
final int
taskId
final int
mUserId
boolean
mDeferRemoval
Constructors Summary
Task(AppWindowToken wtoken, TaskStack stack, int userId)


          
        taskId = wtoken.groupId;
        mAppTokens.add(wtoken);
        mStack = stack;
        mUserId = userId;
    
Methods Summary
voidaddAppToken(int addPos, AppWindowToken wtoken)

        final int lastPos = mAppTokens.size();
        for (int pos = 0; pos < lastPos && pos < addPos; ++pos) {
            if (mAppTokens.get(pos).removed) {
                // addPos assumes removed tokens are actually gone.
                ++addPos;
            }
        }
        mAppTokens.add(addPos, wtoken);
        mDeferRemoval = false;
    
DisplayContentgetDisplayContent()

        return mStack.getDisplayContent();
    
booleanremoveAppToken(AppWindowToken wtoken)

        boolean removed = mAppTokens.remove(wtoken);
        if (mAppTokens.size() == 0) {
            EventLog.writeEvent(com.android.server.EventLogTags.WM_TASK_REMOVED, taskId,
                    "removeAppToken: last token");
        }
        return removed;
    
voidsetSendingToBottom(boolean toBottom)

        for (int appTokenNdx = 0; appTokenNdx < mAppTokens.size(); appTokenNdx++) {
            mAppTokens.get(appTokenNdx).sendingToBottom = toBottom;
        }
    
public java.lang.StringtoString()

        return "{taskId=" + taskId + " appTokens=" + mAppTokens + " mdr=" + mDeferRemoval + "}";