FileDocCategorySizeDatePackage
SpaceNode.javaAPI DocAndroid 5.1 API2445Thu Mar 12 22:22:42 GMT 2015com.android.systemui.recents.model

SpaceNode

public class SpaceNode extends Object
The full recents space is partitioned using a BSP into various nodes that define where task stacks should be placed.

Fields Summary
SpaceNode
mStartNode
SpaceNode
mEndNode
TaskStack
mStack
Constructors Summary
public SpaceNode()

        // Do nothing
    
Methods Summary
TaskStackgetStack()
Returns the task stack (not null if this is a leaf)

        return mStack;
    
public java.util.ArrayListgetStacks()

        ArrayList<TaskStack> stacks = new ArrayList<TaskStack>();
        getStacksRec(stacks);
        return stacks;
    
private voidgetStacksRec(java.util.ArrayList stacks)
Returns all the descendent task stacks

        if (isLeafNode()) {
            stacks.add(mStack);
        } else {
            mStartNode.getStacksRec(stacks);
            mEndNode.getStacksRec(stacks);
        }
    
public booleanhasTasks()
Returns whether there are any tasks in any stacks below this node.

        return (mStack.getTaskCount() > 0) ||
                (mStartNode != null && mStartNode.hasTasks()) ||
                (mEndNode != null && mEndNode.hasTasks());
    
booleanisLeafNode()
Returns whether this is a leaf node

        return (mStartNode == null) && (mEndNode == null);
    
public voidsetStack(TaskStack stack)
Sets the current stack for this space node

        mStack = stack;