/**@class android.os.Message implements android.os.Parcelable @extends java.lang.Object Defines a message containing a description and arbitrary data object that can be sent to a {@link android.os.Handler}. This object contains two extra int fields and an extra object field that allow you to not do allocations in many cases. <p class="note">While the constructor of Message is public, the best way to get one of these is to call {@link #obtain android.os.Message.obtain()} or one of the {@link android.os.Handler#obtainMessage android.os.Handler.obtainMessage()} methods, which will pull them from a pool of recycled objects.</p> */ var Message = { /** User-defined message code so that the recipient can identify what this message is about. Each {@link android.os.Handler} has its own name-space for message codes, so you do not need to worry about yours conflicting with other handlers. */ what : "null", /** arg1 and arg2 are lower-cost alternatives to using {@link #setData(Bundle) setData()} if you only need to store a few integer values. */ arg1 : "null", /** arg1 and arg2 are lower-cost alternatives to using {@link #setData(Bundle) setData()} if you only need to store a few integer values. */ arg2 : "null", /** An arbitrary object to send to the recipient. When using {@link android.os.Messenger} to send the message across processes this can only be non-null if it contains a Parcelable of a framework class (not one implemented by the application). For other data transfer use {@link #setData}. <p>Note that Parcelable objects here are not supported prior to the {@link android.os.Build.VERSION_CODES#FROYO} release. */ obj : "null", /** Optional Messenger where replies to this message can be sent. The semantics of exactly how this is used are up to the sender and receiver. */ replyTo : "null", /** Indicates that the uid is not set; @hide Only for use within the system server. */ UID_NONE : "-1", /** Optional field indicating the uid that sent the message. This is only valid for messages posted by a {@link android.os.Messenger}; otherwise, it will be -1. */ sendingUid : "null", /** Optional field indicating the uid that caused this message to be enqueued. @hide Only for use within the system server. */ workSourceUid : "null", /** The targeted delivery time of this message. The time-base is {@link android.os.SystemClock#uptimeMillis}. @hide Only for use within the tests. */ when : "null", /**@hide */ sPoolSync : "null", /***/ CREATOR : "null", /**Return a new Message instance from the global pool. Allows us to avoid allocating new objects in many cases. */ obtain : function( ) {}, /**Same as {@link #obtain}(), but copies the values of an existing message (including its target) into the new one. @param {Object {Message}} orig Original message to copy. @return {Object {android.os.Message}} A Message object from the global pool. */ obtain : function( ) {}, /**Same as {@link #obtain}(), but sets the value for the <em>target</em> member on the Message returned. @param {Object {Handler}} h Handler to assign to the returned Message object's <em>target</em> member. @return {Object {android.os.Message}} A Message object from the global pool. */ obtain : function( ) {}, /**Same as {@link #obtain}(Handler), but assigns a callback Runnable on the Message that is returned. @param {Object {Handler}} h Handler to assign to the returned Message object's <em>target</em> member. @param {Object {Runnable}} callback Runnable that will execute when the message is handled. @return {Object {android.os.Message}} A Message object from the global pool. */ obtain : function( ) {}, /**Same as {@link #obtain}(), but sets the values for both <em>target</em> and <em>what</em> members on the Message. @param {Object {Handler}} h Value to assign to the <em>target</em> member. @param {Number} what Value to assign to the <em>what</em> member. @return {Object {android.os.Message}} A Message object from the global pool. */ obtain : function( ) {}, /**Same as {@link #obtain}(), but sets the values of the <em>target</em>, <em>what</em>, and <em>obj</em> members. @param {Object {Handler}} h The <em>target</em> value to set. @param {Number} what The <em>what</em> value to set. @param {Object {Object}} obj The <em>object</em> method to set. @return {Object {android.os.Message}} A Message object from the global pool. */ obtain : function( ) {}, /**Same as {@link #obtain}(), but sets the values of the <em>target</em>, <em>what</em>, <em>arg1</em>, and <em>arg2</em> members. @param {Object {Handler}} h The <em>target</em> value to set. @param {Number} what The <em>what</em> value to set. @param {Number} arg1 The <em>arg1</em> value to set. @param {Number} arg2 The <em>arg2</em> value to set. @return {Object {android.os.Message}} A Message object from the global pool. */ obtain : function( ) {}, /**Same as {@link #obtain}(), but sets the values of the <em>target</em>, <em>what</em>, <em>arg1</em>, <em>arg2</em>, and <em>obj</em> members. @param {Object {Handler}} h The <em>target</em> value to set. @param {Number} what The <em>what</em> value to set. @param {Number} arg1 The <em>arg1</em> value to set. @param {Number} arg2 The <em>arg2</em> value to set. @param {Object {Object}} obj The <em>obj</em> value to set. @return {Object {android.os.Message}} A Message object from the global pool. */ obtain : function( ) {}, /** @hide */ updateCheckRecycle : function( ) {}, /**Return a Message instance to the global pool. <p> You MUST NOT touch the Message after calling this function because it has effectively been freed. It is an error to recycle a message that is currently enqueued or that is in the process of being delivered to a Handler. </p> */ recycle : function( ) {}, /**Make this message like o. Performs a shallow copy of the data field. Does not copy the linked list fields, nor the timestamp or target/callback of the original message. */ copyFrom : function( ) {}, /**Return the targeted delivery time of this message, in milliseconds. */ getWhen : function( ) {}, /** */ setTarget : function( ) {}, /**Retrieve the {@link android.os.Handler Handler} implementation that will receive this message. The object must implement {@link android.os.Handler#handleMessage(android.os.Message) Handler.handleMessage()}. Each Handler has its own name-space for message codes, so you do not need to worry about yours conflicting with other handlers. */ getTarget : function( ) {}, /**Retrieve callback object that will execute when this message is handled. This object must implement Runnable. This is called by the <em>target</em> {@link android.os.Handler} that is receiving this Message to dispatch it. If not set, the message will be dispatched to the receiving Handler's {@link android.os.Handler#handleMessage(Message)}. */ getCallback : function( ) {}, /** @hide */ setCallback : function( ) {}, /**Obtains a Bundle of arbitrary data associated with this event, lazily creating it if necessary. Set this value by calling {@link #setData}(Bundle). Note that when transferring data across processes via {@link android.os.Messenger}, you will need to set your ClassLoader on the Bundle via {@link android.os.Bundle#setClassLoader(ClassLoader) android.os.Bundle.setClassLoader()} so that it can instantiate your objects when you retrieve them. @see #peekData() @see #setData(Bundle) */ getData : function( ) {}, /**Like getData(), but does not lazily create the Bundle. A null is returned if the Bundle does not already exist. See {@link #getData} for further information on this. @see #getData() @see #setData(Bundle) */ peekData : function( ) {}, /**Sets a Bundle of arbitrary data values. Use arg1 and arg2 members as a lower cost way to send a few simple integer values, if you can. @see #getData() @see #peekData() */ setData : function( ) {}, /**Chainable setter for {@link #what} @hide */ setWhat : function( ) {}, /**Sends this Message to the Handler specified by {@link #getTarget}. Throws a null pointer exception if this field has not been set. */ sendToTarget : function( ) {}, /**Returns true if the message is asynchronous, meaning that it is not subject to {@link android.os.Looper} synchronization barriers. @return {Boolean} True if the message is asynchronous. @see #setAsynchronous(boolean) */ isAsynchronous : function( ) {}, /**Sets whether the message is asynchronous, meaning that it is not subject to {@link android.os.Looper} synchronization barriers. <p> Certain operations, such as view invalidation, may introduce synchronization barriers into the {@link android.os.Looper}'s message queue to prevent subsequent messages from being delivered until some condition is met. In the case of view invalidation, messages which are posted after a call to {@link android.view.View#invalidate} are suspended by means of a synchronization barrier until the next frame is ready to be drawn. The synchronization barrier ensures that the invalidation request is completely handled before resuming. </p><p> Asynchronous messages are exempt from synchronization barriers. They typically represent interrupts, input events, and other signals that must be handled independently even while other work has been suspended. </p><p> Note that asynchronous messages may be delivered out of order with respect to synchronous messages although they are always delivered in order among themselves. If the relative order of these messages matters then they probably should not be asynchronous in the first place. Use with caution. </p> @param {Boolean} async True if the message is asynchronous. @see #isAsynchronous() */ setAsynchronous : function( ) {}, /** */ toString : function( ) {}, /** */ describeContents : function( ) {}, /** */ writeToParcel : function( ) {}, };