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

Commit 96e6bdb0 authored by Irfan Sheriff's avatar Irfan Sheriff
Browse files

Add obtainMessage functions to HSM

Change-Id: Idc907f429cf15e61ad461af95fdc245fd5aca23f
parent 5b7e333c
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -1196,6 +1196,35 @@ public class HierarchicalStateMachine {
        return Message.obtain(mHsmHandler, what, obj);
    }

    /**
     * Get a message and set Message.target = this,
     * what, arg1 and arg2
     *
     * @param what  is assigned to Message.what
     * @param arg1  is assigned to Message.arg1
     * @param arg2  is assigned to Message.arg2
     * @return  A Message object from the global pool.
     */
    public final Message obtainMessage(int what, int arg1, int arg2)
    {
        return Message.obtain(mHsmHandler, what, arg1, arg2);
    }

    /**
     * Get a message and set Message.target = this,
     * what, arg1, arg2 and obj
     *
     * @param what  is assigned to Message.what
     * @param arg1  is assigned to Message.arg1
     * @param arg2  is assigned to Message.arg2
     * @param obj is assigned to Message.obj
     * @return  A Message object from the global pool.
     */
    public final Message obtainMessage(int what, int arg1, int arg2, Object obj)
    {
        return Message.obtain(mHsmHandler, what, arg1, arg2, obj);
    }

    /**
     * Enqueue a message to this state machine.
     */