Code example for Parcel

Methods: writeInt, writeNoException

0
} 
case TRANSACTION_getPTPMsg:
{ 
data.enforceInterface(DESCRIPTOR);
java.lang.String _result = this.getPTPMsg();
reply.writeNoException();
reply.writeString(_result);
return true; 
} 
case TRANSACTION_hasNewMsg:
{ 
data.enforceInterface(DESCRIPTOR);
boolean _result = this.hasNewMsg();
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return true; 
} 
case TRANSACTION_removeMsg:
{ 
data.enforceInterface(DESCRIPTOR);
this.removeMsg();
reply.writeNoException();
return true; 
} 
case TRANSACTION_msgIsGPS:
{ 
data.enforceInterface(DESCRIPTOR);
boolean _result = this.msgIsGPS();
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return true; 
} 
case TRANSACTION_getPTPTypeMsg:
{ 
data.enforceInterface(DESCRIPTOR);
java.lang.String _arg0;
_arg0 = data.readString();
java.lang.String _result = this.getPTPTypeMsg(_arg0);
reply.writeNoException();
reply.writeString(_result);
return true; 
} 
case TRANSACTION_msgToLocation:
{ 
data.enforceInterface(DESCRIPTOR);
java.lang.String _arg0;
_arg0 = data.readString();
android.location.Location _arg1;
if ((0!=data.readInt())) {
_arg1 = android.location.Location.CREATOR.createFromParcel(data);
} 
else { 
_arg1 = null;
} 
android.location.Location _result = this.msgToLocation(_arg0, _arg1);
reply.writeNoException();
if ((_result!=null)) {
reply.writeInt(1);
_result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
} 
else { 
reply.writeInt(0);
} 
return true; 
} 
} 
return super.onTransact(code, data, reply, flags);