Code example for Parcel

Methods: readInt, readLong

0
 
    public TestArgs() { 
    } 
 
    public TestArgs(Parcel source) {
        maxTime = source.readLong();
        maxOps = source.readLong();
        combOp = source.readInt();
        fgOp = source.readInt();
        bgOp = source.readInt();
    } 
 
    @Override 
    public int describeContents() { 
        return 0; 
    } 
 
    @Override 
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(maxTime);
        dest.writeLong(maxOps);