List of usage examples for android.os Parcel writeInt
public final void writeInt(int val)
From source file:fr.free.nrw.commons.Media.java
/** * Creates a way to transfer information between two or more * activities./* w w w . j av a 2s . c o m*/ * @param parcel Instance of Parcel * @param flags Parcel flag */ @Override public void writeToParcel(Parcel parcel, int flags) { parcel.writeParcelable(localUri, flags); parcel.writeString(thumbUrl); parcel.writeString(imageUrl); parcel.writeString(filename); parcel.writeString(description); parcel.writeLong(dataLength); parcel.writeSerializable(dateCreated); parcel.writeSerializable(dateUploaded); parcel.writeString(creator); parcel.writeSerializable(tags); parcel.writeInt(width); parcel.writeInt(height); parcel.writeString(license); parcel.writeStringList(categories); parcel.writeMap(descriptions); }
From source file:com.orbar.pxdemo.Model.FiveZeroZeroImageBean.java
@Override public void writeToParcel(Parcel dest, int flags) { Log.v(TAG, "writeToParcel..." + flags); dest.writeInt(id); dest.writeInt(userId);/* ww w . jav a 2 s. c o m*/ dest.writeString(name); dest.writeString(description); dest.writeString(camera); dest.writeString(lens); dest.writeString(focalLength); dest.writeString(iso); dest.writeString(shutterSpeed); dest.writeString(aperture); dest.writeInt(timesViewed); dest.writeFloat(rating); dest.writeString(createdAt); dest.writeInt(status); dest.writeString(createdAt); dest.writeInt(category); dest.writeString(location); dest.writeByte((byte) (privacy ? 1 : 0)); // Boolean dest.writeString(latitude); dest.writeString(longitude); dest.writeString(takenAt); dest.writeInt(hiResUploaded); dest.writeByte((byte) (forSale ? 1 : 0)); // Boolean dest.writeInt(width); dest.writeInt(height); dest.writeInt(votesCount); dest.writeInt(favoritesCount); dest.writeInt(commentsCount); dest.writeByte((byte) (nsfw ? 1 : 0)); // Boolean dest.writeInt(salesCount); dest.writeFloat(highestRating); dest.writeString(highestRatingDate); dest.writeInt(licenseType); dest.writeString(imageUrl); dest.writeByte((byte) (storeDownload ? 1 : 0)); // Boolean dest.writeByte((byte) (storePrint ? 1 : 0)); // Boolean dest.writeByte((byte) (voted ? 1 : 0)); // Boolean dest.writeByte((byte) (favorited ? 1 : 0)); // Boolean dest.writeByte((byte) (purchased ? 1 : 0)); // Boolean dest.writeParcelable(userBean, flags); }
From source file:com.tdispatch.passenger.model.BookingData.java
@Override public void writeToParcel(Parcel out, int flags) { out.writeLong(getLocalId());/* www .j a v a2 s. co m*/ out.writeString(getPk()); out.writeString(getBookingKey()); out.writeString(getDriverPk()); out.writeString(getPickupDateString()); out.writeParcelable(getPickupLocation(), 0); out.writeParcelable(getDropoffLocation(), 0); out.writeInt(getPassengerCount()); out.writeInt(getLuggageCount()); out.writeString(getFlightNumber()); out.writeDouble(getDistanceKm()); out.writeDouble(getDistanceMiles()); out.writeString(getCustomerName()); out.writeString(getCustomerPhone()); out.writeString(getExtraInfo()); out.writeString(getPaymentStatus()); out.writeInt(getPaymentMethod()); out.writeByte((byte) (isPrepaid() ? 1 : 0)); out.writeString(getCost()); out.writeString(getTotalCost()); out.writeString(getCabOfficeName()); out.writeString(getCabOfficeSlug()); out.writeInt(getType()); out.writeString(getReceiptUrl()); out.writeString(getJson().toString()); out.writeInt(mWayPoints.size()); for (LocationData item : mWayPoints) { out.writeParcelable(item, 0); } }
From source file:de.mrapp.android.preference.activity.PreferenceHeader.java
@Override public final void writeToParcel(final Parcel dest, final int flags) { TextUtils.writeToParcel(getTitle(), dest, flags); TextUtils.writeToParcel(getSummary(), dest, flags); TextUtils.writeToParcel(getBreadCrumbTitle(), dest, flags); TextUtils.writeToParcel(getBreadCrumbShortTitle(), dest, flags); Bitmap bitmap = (getIcon() != null && getIcon() instanceof BitmapDrawable) ? ((BitmapDrawable) getIcon()).getBitmap() : null;//from w ww . j a v a2 s.co m dest.writeParcelable(bitmap, flags); dest.writeString(getFragment()); dest.writeBundle(getExtras()); if (getIntent() != null) { dest.writeInt(1); getIntent().writeToParcel(dest, flags); } else { dest.writeInt(0); } }
From source file:com.tct.mail.providers.Attachment.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(name);//from ww w .j a v a2s . c o m dest.writeInt(size); dest.writeParcelable(uri, flags); dest.writeString(contentType); dest.writeInt(state); dest.writeInt(destination); dest.writeInt(downloadedSize); dest.writeParcelable(contentUri, flags); dest.writeParcelable(thumbnailUri, flags); dest.writeParcelable(previewIntentUri, flags); dest.writeString(providerData); dest.writeInt(supportsDownloadAgain ? 1 : 0); dest.writeInt(type); dest.writeInt(flags); //TS: wenggangjin 2014-12-10 EMAIL BUGFIX_852100 MOD_S dest.writeString(contentId); //TS: wenggangjin 2014-12-10 EMAIL BUGFIX_852100 MOD_E //TS: zhonghua.tuo 2015-3-3 EMAIL BUGFIX_936728 ADD_S dest.writeParcelable(realUri, flags); //TS: zhonghua.tuo 2015-3-3 EMAIL BUGFIX_936728 ADD_E // TS: Gantao 2015-09-19 EMAIL BUGFIX_570084 ADD_S dest.writeInt(isInline); // TS: Gantao 2015-09-19 EMAIL BUGFIX_570084 ADD_E }
From source file:com.eTilbudsavis.etasdk.model.Shoppinglist.java
public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.mErn); dest.writeString(this.mName); dest.writeString(this.mAccess); dest.writeLong(mModified != null ? mModified.getTime() : -1); dest.writeString(this.mPrevId); dest.writeString(this.mType); dest.writeString(this.mMeta); dest.writeSerializable(this.mShares); dest.writeInt(this.mUserId); dest.writeInt(this.mSyncState); }
From source file:com.eTilbudsavis.etasdk.model.Catalog.java
public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.mErn); dest.writeString(this.mLabel); dest.writeValue(this.mBackground); dest.writeLong(mRunFrom != null ? mRunFrom.getTime() : -1); dest.writeLong(mRunTill != null ? mRunTill.getTime() : -1); dest.writeInt(this.mPageCount); dest.writeInt(this.mOfferCount); dest.writeParcelable(this.mBranding, flags); dest.writeString(this.mDealerId); dest.writeString(this.mDealerUrl); dest.writeString(this.mStoreId); dest.writeString(this.mStoreUrl); dest.writeParcelable(this.mDimension, flags); dest.writeParcelable(this.mImages, flags); dest.writeSerializable(this.mCatrgoryIds); dest.writeString(this.mPdfUrl); dest.writeTypedList(mPages);/*from w w w .j a v a 2 s.c om*/ dest.writeParcelable(this.mDealer, flags); dest.writeParcelable(this.mStore, flags); dest.writeParcelable(this.mHotspots, flags); }
From source file:com.android.emailcommon.provider.Account.java
/** * Supports Parcelable//from w w w . j a va 2s.c o m */ @Override public void writeToParcel(Parcel dest, int flags) { // mBaseUri is not parceled dest.writeLong(mId); dest.writeString(mDisplayName); dest.writeString(mEmailAddress); dest.writeString(mSyncKey); dest.writeInt(mSyncLookback); dest.writeInt(mSyncInterval); dest.writeLong(mHostAuthKeyRecv); dest.writeLong(mHostAuthKeySend); dest.writeInt(mFlags); dest.writeString("" /* mCompatibilityUuid */); dest.writeString(mSenderName); dest.writeString(mRingtoneUri); dest.writeString(mProtocolVersion); dest.writeInt(0 /* mNewMessageCount */); dest.writeString(mSecuritySyncKey); dest.writeString(mSignature); dest.writeLong(mPolicyKey); if (mHostAuthRecv != null) { dest.writeByte((byte) 1); mHostAuthRecv.writeToParcel(dest, flags); } else { dest.writeByte((byte) 0); } if (mHostAuthSend != null) { dest.writeByte((byte) 1); mHostAuthSend.writeToParcel(dest, flags); } else { dest.writeByte((byte) 0); } }
From source file:android.database.DatabaseUtils.java
/** * Special function for writing an exception result at the header of * a parcel, to be used when returning an exception from a transaction. * exception will be re-thrown by the function in another process * @param reply Parcel to write to/*w w w . jav a2 s .c o m*/ * @param e The Exception to be written. * @see Parcel#writeNoException * @see Parcel#writeException */ public static final void writeExceptionToParcel(Parcel reply, Exception e) { int code = 0; boolean logException = true; if (e instanceof FileNotFoundException) { code = 1; logException = false; } else if (e instanceof IllegalArgumentException) { code = 2; } else if (e instanceof UnsupportedOperationException) { code = 3; } else if (e instanceof SQLiteAbortException) { code = 4; } else if (e instanceof SQLiteConstraintException) { code = 5; } else if (e instanceof SQLiteDatabaseCorruptException) { code = 6; } else if (e instanceof SQLiteFullException) { code = 7; } else if (e instanceof SQLiteDiskIOException) { code = 8; } else if (e instanceof SQLiteException) { code = 9; } else if (e instanceof OperationApplicationException) { code = 10; } else { reply.writeException(e); Log.e(TAG, "Writing exception to parcel", e); return; } reply.writeInt(code); reply.writeString(e.getMessage()); if (logException) { Log.e(TAG, "Writing exception to parcel", e); } }
From source file:com.google.android.apps.common.testing.accessibility.framework.uielement.ViewHierarchyElement.java
void writeToParcel(Parcel out) { ParcelUtils.writeNullableString(out, packageName == null ? null : packageName.toString()); ParcelUtils.writeNullableString(out, className == null ? null : className.toString()); ParcelUtils.writeNullableString(out, resourceName); if (contentDescription != null) { out.writeInt(1); out.writeParcelable(contentDescription, 0); } else {/*w w w .j ava 2 s . co m*/ out.writeInt(0); } if (text != null) { out.writeInt(1); out.writeParcelable(text, 0); } else { out.writeInt(0); } out.writeInt(importantForAccessibility ? 1 : 0); ParcelUtils.writeNullableBoolean(out, visibleToUser); out.writeInt(clickable ? 1 : 0); out.writeInt(longClickable ? 1 : 0); out.writeInt(focusable ? 1 : 0); ParcelUtils.writeNullableBoolean(out, editable); ParcelUtils.writeNullableBoolean(out, scrollable); ParcelUtils.writeNullableBoolean(out, checkable); ParcelUtils.writeNullableBoolean(out, checked); ParcelUtils.writeNullableBoolean(out, canScrollForward); ParcelUtils.writeNullableBoolean(out, canScrollBackward); ParcelUtils.writeNullableBoolean(out, hasTouchDelegate); out.writeInt(enabled ? 1 : 0); if (boundsInScreen != null) { out.writeInt(1); boundsInScreen.writeToParcel(out, 0); } else { out.writeInt(0); } ParcelUtils.writeNullableInteger(out, nonclippedHeight); ParcelUtils.writeNullableInteger(out, nonclippedWidth); ParcelUtils.writeNullableFloat(out, textSize); ParcelUtils.writeNullableInteger(out, textColor); ParcelUtils.writeNullableInteger(out, backgroundDrawableColor); ParcelUtils.writeNullableInteger(out, typefaceStyle); ParcelUtils.writeNullableLong(out, labeledById); ParcelUtils.writeNullableString(out, accessibilityClassName == null ? null : accessibilityClassName.toString()); ParcelUtils.writeNullableLong(out, accessibilityTraversalBeforeId); ParcelUtils.writeNullableLong(out, accessibilityTraversalAfterId); }