List of usage examples for android.os Parcel writeInt
public final void writeInt(int val)
From source file:com.wootric.androidsdk.objects.Settings.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeValue(this.firstSurvey); dest.writeValue(this.userID); dest.writeValue(this.accountID); dest.writeInt(this.adminPanelTimeDelay); dest.writeParcelable(this.localizedTexts, 0); dest.writeParcelable(this.adminPanelCustomMessage, 0); dest.writeParcelable(this.localCustomMessage, 0); dest.writeInt(this.timeDelay); dest.writeByte(surveyImmediately ? (byte) 1 : (byte) 0); dest.writeValue(this.dailyResponseCap); dest.writeValue(this.registeredPercent); dest.writeValue(this.visitorPercent); dest.writeValue(this.resurveyThrottle); dest.writeValue(this.declineResurveyThrottle); dest.writeString(this.languageCode); dest.writeString(this.productName); dest.writeString(this.recommendTarget); dest.writeString(this.facebookPageId); dest.writeString(this.twitterPage); dest.writeParcelable(this.customThankYou, 0); }
From source file:com.playhaven.android.data.Purchase.java
/** * Flatten this object in to a Parcel.// ww w . ja v a2 s . co m * * @param dest The Parcel in which the object should be written. * @param flags Additional flags about how the object should be written. May be 0 or Parcel#PARCELABLE_WRITE_RETURN_VALUE. */ @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(sku); dest.writeString(title); dest.writeString(quantity); dest.writeString(price); dest.writeString(store); dest.writeString(signature); dest.writeString(receipt); dest.writeString(cookie); dest.writeString(placementTag); dest.writeString(payload); dest.writeString(orderId); dest.writeInt(result.ordinal()); }
From source file:com.richtodd.android.quiltdesign.block.PaperPiecedBlockPiece.java
@Override public void writeToParcel(Parcel out, int flags) { out.writeSerializable(m_id);/*from ww w . java2 s . co m*/ out.writeParcelable(m_from, 0); out.writeParcelable(m_to, 0); out.writeInt(m_color); }
From source file:com.google.android.apps.dashclock.api.ExtensionData.java
@Override public void writeToParcel(Parcel parcel, int i) { /**//from w ww. j a v a 2 s . c o m * NOTE: When adding fields in the process of updating this API, make sure to bump * {@link #PARCELABLE_VERSION}. */ parcel.writeInt(PARCELABLE_VERSION); // Inject a placeholder that will store the parcel size from this point on // (not including the size itself). int sizePosition = parcel.dataPosition(); parcel.writeInt(0); int startPosition = parcel.dataPosition(); // Version 1 below parcel.writeInt(mVisible ? 1 : 0); parcel.writeInt(mIcon); parcel.writeString(TextUtils.isEmpty(mStatus) ? "" : mStatus); parcel.writeString(TextUtils.isEmpty(mExpandedTitle) ? "" : mExpandedTitle); parcel.writeString(TextUtils.isEmpty(mExpandedBody) ? "" : mExpandedBody); parcel.writeString((mClickIntent == null) ? "" : mClickIntent.toUri(0)); // Version 2 below parcel.writeString(TextUtils.isEmpty(mContentDescription) ? "" : mContentDescription); parcel.writeString(mIconUri == null ? "" : mIconUri.toString()); // Go back and write the size int parcelableSize = parcel.dataPosition() - startPosition; parcel.setDataPosition(sizePosition); parcel.writeInt(parcelableSize); parcel.setDataPosition(startPosition + parcelableSize); }
From source file:com.mindmeapp.extensions.ExtensionData.java
@Override public void writeToParcel(Parcel parcel, int i) { /**//from www.ja va 2 s . com * NOTE: When adding fields in the process of updating this API, make sure to bump * {@link #PARCELABLE_VERSION}. */ parcel.writeInt(PARCELABLE_VERSION); // Version 1 below parcel.writeInt(mVisible ? 1 : 0); parcel.writeInt(mIcon); parcel.writeString(mIconUri == null ? "" : mIconUri.toString()); parcel.writeString(TextUtils.isEmpty(mStatusToDisplay) ? "" : mStatusToDisplay); parcel.writeString(TextUtils.isEmpty(mStatusToSpeak) ? "" : mStatusToSpeak); parcel.writeSerializable(mLanguageToSpeak); parcel.writeParcelable(mViewsToDisplay, i); parcel.writeString(TextUtils.isEmpty(mContentDescription) ? "" : mContentDescription); parcel.writeInt(mBackground); parcel.writeString(mBackgroundUri == null ? "" : mBackgroundUri.toString()); }
From source file:io.openkit.OKLeaderboard.java
@Override public void writeToParcel(Parcel out, int flags) { //private String name; out.writeString(name);//www .ja v a 2 s . co m //private int OKAPP_id; out.writeInt(OKAPP_id); //private int OKLeaderboard_id; out.writeInt(OKLeaderboard_id); //private LeaderboardSortType sortType; out.writeString((sortType == null) ? "" : sortType.name()); //private String icon_url; out.writeString(icon_url); //private int playerCount; out.writeInt(playerCount); }
From source file:org.droid2droid.internal.AbstractRemoteAndroidImpl.java
@Override public boolean unbindService(ServiceConnection conn) { synchronized (mBinders) { Binded binder = mBinders.get(conn); if (binder != null) { if (D) Log.d(TAG_CLIENT_BIND, PREFIX_LOG + "UnBindOID..."); Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { try { data.writeInt(System.identityHashCode(conn)); transactRemoteAndroid(getConnectionId(), UNBIND_SRV, data, reply, 0, mExecuteTimeout); if (D) Log.d(TAG_CLIENT_BIND, PREFIX_LOG + "UnBindOID ok"); } catch (RemoteException e) { if (W && !D) Log.w(TAG_CLIENT_BIND, "Error when unbind (" + e.getMessage() + ")"); if (D) Log.w(TAG_CLIENT_BIND, "Errer when unbind", e); }//from ww w . j av a 2s.c om } finally { if (data != null) data.recycle(); if (reply != null) reply.recycle(); } mBinders.remove(conn); } else return false; } return true; }
From source file:de.schildbach.wallet.data.PaymentIntent.java
@Override public void writeToParcel(final Parcel dest, final int flags) { dest.writeSerializable(standard);/*from w ww. j a v a 2s. c o m*/ dest.writeString(payeeName); dest.writeString(payeeVerifiedBy); if (outputs != null) { dest.writeInt(outputs.length); dest.writeTypedArray(outputs, 0); } else { dest.writeInt(0); } dest.writeString(memo); dest.writeString(paymentUrl); if (payeeData != null) { dest.writeInt(payeeData.length); dest.writeByteArray(payeeData); } else { dest.writeInt(0); } dest.writeString(paymentRequestUrl); if (paymentRequestHash != null) { dest.writeInt(paymentRequestHash.length); dest.writeByteArray(paymentRequestHash); } else { dest.writeInt(0); } }
From source file:com.android.emailcommon.provider.HostAuth.java
/** * Supports Parcelable// w ww .j a v a 2s . co m */ @Override public void writeToParcel(Parcel dest, int flags) { // mBaseUri is not parceled dest.writeLong(mId); dest.writeString(mProtocol); dest.writeString(mAddress); dest.writeInt(mPort); dest.writeInt(mFlags); dest.writeString(mLogin); dest.writeString(mPassword); dest.writeString(mDomain); dest.writeString(mClientCertAlias); if ((mFlags & FLAG_OAUTH) != 0) { // TODO: This is nasty, but to be compatible with backward Exchange, we can't make any // change to the parcelable format. But we need Credential objects to be here. // So... only parcel or unparcel Credentials if the OAUTH flag is set. This will never // be set on HostAuth going to or coming from Exchange. dest.writeLong(mCredentialKey); if (mCredential == null) { Credential.EMPTY.writeToParcel(dest, flags); } else { mCredential.writeToParcel(dest, flags); } } }
From source file:jp.alessandro.android.iab.Item.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(mOriginalJson);/*from ww w .j ava 2s . co m*/ dest.writeString(mSku); dest.writeString(mType); dest.writeString(mTitle); dest.writeString(mDescription); dest.writeString(mCurrency); dest.writeString(mPrice); dest.writeLong(mPriceMicros); dest.writeString(mSubscriptionPeriod); dest.writeString(mFreeTrialPeriod); dest.writeString(mIntroductoryPrice); dest.writeLong(mIntroductoryPriceAmountMicros); dest.writeString(mIntroductoryPricePeriod); dest.writeInt(mIntroductoryPriceCycles); }