List of usage examples for android.os Parcel writeInt
public final void writeInt(int val)
From source file:com.philliphsu.clock2.alarms.Alarm.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(hour()); dest.writeInt(minutes());//from www . ja v a 2 s . c om dest.writeString(label()); dest.writeString(ringtone()); dest.writeInt(vibrates() ? 1 : 0); // Mutable fields must be written after the immutable fields, // because when we recreate the object, we can't initialize // those mutable fields until after we call build(). Values // in the parcel are read in the order they were written. dest.writeLong(getId()); dest.writeLong(snoozingUntilMillis); dest.writeInt(enabled ? 1 : 0); dest.writeBooleanArray(recurringDays); dest.writeInt(ignoreUpcomingRingTime ? 1 : 0); }
From source file:jp.alessandro.android.iab.Purchase.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(mOriginalJson);/*from w w w . j av a 2 s .c om*/ dest.writeString(mOrderId); dest.writeString(mPackageName); dest.writeString(mSku); dest.writeLong(mPurchaseTime); dest.writeInt(mPurchaseState); dest.writeString(mDeveloperPayload); dest.writeString(mToken); dest.writeByte(mAutoRenewing ? (byte) 1 : (byte) 0); dest.writeString(mSignature); }
From source file:io.github.data4all.model.data.TransformationParamBean.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeDouble(height);/*from w ww . j a v a 2s.c o m*/ dest.writeDouble(verticalViewAngle); dest.writeDouble(horizontalViewAngle); dest.writeInt(photoWidth); dest.writeInt(photoHeight); if (location != null) { dest.writeInt(1); dest.writeString(location.getProvider()); dest.writeDouble(location.getLatitude()); dest.writeDouble(location.getLongitude()); } else { dest.writeInt(0); } }
From source file:com.artemchep.horario.database.models.Note.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(key);//from w w w . ja v a 2 s . com dest.writeString(title); dest.writeString(content); dest.writeString(contentHtml); dest.writeString(priority); dest.writeStringList(subjects); dest.writeInt(due); }
From source file:com.example.testmoodle.util.Document.java
public void writeToParcel(Parcel dest, int flags) { dest.writeString(type);//from w ww . j a v a 2 s . c om dest.writeString(fileName); dest.writeString(filePath); dest.writeInt(fileSize); dest.writeString(fileURL); dest.writeString(content); dest.writeLong(timeCreated); dest.writeLong(timeModified); dest.writeInt(sortedOrder); dest.writeInt(userID); dest.writeString(author); dest.writeString(license); }
From source file:edu.umich.flowfence.common.CallParam.java
@Override public void writeToParcel(Parcel dest, int flags) { int startPos = dest.dataPosition(); if (payload == null) { setType(TYPE_NULL);//from w w w .j a v a 2 s . c om } dest.writeInt(header); switch (getType()) { case TYPE_NULL: // NULL: no need to write any data break; case TYPE_DATA: // DATA: write parceled data as byte[], so it can be skipped // without running untrusted code ParceledPayload parceled = (payload instanceof ParceledPayload) ? (ParceledPayload) payload : ParceledPayload.create(payload); parceled.writeToParcel(dest, flags); break; case TYPE_HANDLE: dest.writeStrongBinder((IBinder) payload); break; default: throw new IllegalArgumentException(String.format("Unknown CallParam type 0x%02x", header & MASK_TYPE)); } //Log.d(TAG, String.format("Wrote (%d bytes @0x%x) %s", dest.dataPosition() - startPos, startPos, this)); }
From source file:com.liferay.alerts.model.Alert.java
@Override public void writeToParcel(Parcel parcel, int flags) { parcel.writeLong(_id);//w w w . java 2 s .c o m parcel.writeParcelable(_user, 0); parcel.writeString(_payload.toString()); parcel.writeInt((_read ? 1 : 0)); parcel.writeLong(_timestamp); }
From source file:net.soulwolf.structure.core.FragmentParameter.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeSerializable(mFragmentClass); dest.writeBundle(mParams);//from www . ja v a2s . c om dest.writeString(mTag); dest.writeInt(mRequestCode); dest.writeInt(mResultCode); int size = 0; if (mAnimationRes != null) { size = mAnimationRes.length; } dest.writeInt(size); dest.writeIntArray(mAnimationRes); dest.writeParcelable(mResultParams, flags); }
From source file:com.facebook.notifications.internal.asset.ParcelableAssetHandler.java
@Override public void writeToParcel(Parcel dest, int flags) { if (handler == null) { throw new IllegalStateException("AssetHandler should not be null, did you forget to call validate()?"); }/*from w w w . ja va2 s . co m*/ if (handler instanceof Parcelable) { dest.writeInt(1); dest.writeParcelable((Parcelable) handler, flags); } else { dest.writeInt(0); dest.writeString(handler.getClass().getName()); } }
From source file:com.guavabot.alarmpreference.Alarm.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeByte((byte) (mAlarmOn ? 1 : 0)); dest.writeString(TIME_FMT.print(mTime)); dest.writeInt(mWeeklyAlarms); dest.writeLong(mId);/*from w w w . ja v a 2s . c o m*/ }