Code example for Parcel

Methods: enforceInterfacereadIntreadStrongBinder

0
reply.writeString(DESCRIPTOR);
return true; 
} 
case TRANSACTION_onIncomingMessage:
{ 
data.enforceInterface(DESCRIPTOR);
com.android.im.IChatSession _arg0;
_arg0 = com.android.im.IChatSession.Stub.asInterface(data.readStrongBinder());
com.android.im.engine.Message _arg1;
if ((0!=data.readInt())) {
_arg1 = com.android.im.engine.Message.CREATOR.createFromParcel(data);
} 
else { 
_arg1 = null;
} 
this.onIncomingMessage(_arg0, _arg1);
return true; 
} 
case TRANSACTION_onSendMessageError:
{ 
data.enforceInterface(DESCRIPTOR);
com.android.im.IChatSession _arg0;
_arg0 = com.android.im.IChatSession.Stub.asInterface(data.readStrongBinder());
com.android.im.engine.Message _arg1;
if ((0!=data.readInt())) {
_arg1 = com.android.im.engine.Message.CREATOR.createFromParcel(data);
} 
else { 
_arg1 = null;
} 
com.android.im.engine.ImErrorInfo _arg2;
if ((0!=data.readInt())) {
_arg2 = com.android.im.engine.ImErrorInfo.CREATOR.createFromParcel(data);
} 
else { 
_arg2 = null;
} 
this.onSendMessageError(_arg0, _arg1, _arg2);
return true; 
} 
case TRANSACTION_onConvertedToGroupChat:
{ 
data.enforceInterface(DESCRIPTOR);
com.android.im.IChatSession _arg0;
_arg0 = com.android.im.IChatSession.Stub.asInterface(data.readStrongBinder());
this.onConvertedToGroupChat(_arg0);
return true; 
} 
case TRANSACTION_onContactJoined:
{ 
data.enforceInterface(DESCRIPTOR);
com.android.im.IChatSession _arg0;
_arg0 = com.android.im.IChatSession.Stub.asInterface(data.readStrongBinder());
com.android.im.engine.Contact _arg1;
if ((0!=data.readInt())) {
_arg1 = com.android.im.engine.Contact.CREATOR.createFromParcel(data);
} 
else { 
_arg1 = null;
} 
this.onContactJoined(_arg0, _arg1);
return true; 
} 
case TRANSACTION_onContactLeft:
{ 
data.enforceInterface(DESCRIPTOR);
com.android.im.IChatSession _arg0;
_arg0 = com.android.im.IChatSession.Stub.asInterface(data.readStrongBinder());
com.android.im.engine.Contact _arg1;
if ((0!=data.readInt())) {
_arg1 = com.android.im.engine.Contact.CREATOR.createFromParcel(data);
} 
else { 
_arg1 = null;
} 
this.onContactLeft(_arg0, _arg1);
return true; 
} 
case TRANSACTION_onInviteError:
{ 
data.enforceInterface(DESCRIPTOR);
com.android.im.IChatSession _arg0;
_arg0 = com.android.im.IChatSession.Stub.asInterface(data.readStrongBinder());
com.android.im.engine.ImErrorInfo _arg1;
if ((0!=data.readInt())) {
_arg1 = com.android.im.engine.ImErrorInfo.CREATOR.createFromParcel(data);
} 
else { 
_arg1 = null;
} 
this.onInviteError(_arg0, _arg1);