Methods Summary |
---|
public int | describeContents()
return 0;
|
public boolean | equals(java.lang.Object otherObj)Comparison operator on two Messenger objects, such that true
is returned then they both point to the same Handler.
if (otherObj == null) {
return false;
}
try {
return mTarget.asBinder().equals(((Messenger)otherObj)
.mTarget.asBinder());
} catch (ClassCastException e) {
}
return false;
|
public IBinder | getBinder()Retrieve the IBinder that this Messenger is using to communicate with
its associated Handler.
return mTarget.asBinder();
|
public int | hashCode()
return mTarget.asBinder().hashCode();
|
public static android.os.Messenger | readMessengerOrNullFromParcel(Parcel in)Convenience function for reading either a Messenger or null pointer from
a Parcel. You must have previously written the Messenger with
{@link #writeMessengerOrNullToParcel}.
IBinder b = in.readStrongBinder();
return b != null ? new Messenger(b) : null;
|
public void | send(Message message)Send a Message to this Messenger's Handler.
mTarget.send(message);
|
public static void | writeMessengerOrNullToParcel(android.os.Messenger messenger, Parcel out)Convenience function for writing either a Messenger or null pointer to
a Parcel. You must use this with {@link #readMessengerOrNullFromParcel}
for later reading it.
out.writeStrongBinder(messenger != null ? messenger.mTarget.asBinder()
: null);
|
public void | writeToParcel(Parcel out, int flags)
out.writeStrongBinder(mTarget.asBinder());
|