Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03d2d00d authored by Jason Sams's avatar Jason Sams
Browse files

Cleanup Allocation docs and getter funcs.

Change-Id: Ic6fb92e0675d64016f0d471c1d9e5328101e4b36
parent cbe55a1c
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -188,6 +188,29 @@ public class Allocation extends BaseObj {
        return getID();
    }


   /**
     * Get the element of the type of the Allocation.
     *
     * @hide
     * @return Element
     *
     */
    public Element getElement() {
        return mType.getElement();
    }

    /**
     * Get the usage flags of the Allocation.
     *
     * @hide
     * @return usage
     *
     */
    public int getUsage() {
        return mUsage;
    }

    private void updateCacheInfo(Type t) {
        mCurrentDimX = t.getX();
        mCurrentDimY = t.getY();
@@ -294,10 +317,21 @@ public class Allocation extends BaseObj {
        }
    }

    /**
     * Get the type of the Allocation.
     *
     * @return Type
     *
     */
    public Type getType() {
        return mType;
    }

    /**
     * Propogate changes from one usage of the allocation to the
     * remaining usages of the allocation.
     *
     */
    public void syncAll(int srcLocation) {
        switch (srcLocation) {
        case USAGE_SCRIPT:
@@ -343,6 +377,11 @@ public class Allocation extends BaseObj {
        mRS.nAllocationIoReceive(getID());
    }

    /**
     * Copy an array of RS objects to the allocation
     *
     * @param d Source array.
     */
    public void copyFrom(BaseObj[] d) {
        mRS.validate();
        validateIsObject();