Java Code Examples for android.os.Parcel#writeSerializable()

The following examples show how to use android.os.Parcel#writeSerializable() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: openlocate-android   File: OpenLocate.java    License: MIT License 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedList(this.endpoints);
    dest.writeString(this.serverUrl);
    dest.writeSerializable(this.headers);
    dest.writeLong(this.transmissionInterval);
    dest.writeLong(this.locationUpdateInterval);
    dest.writeInt(this.locationAccuracy == null ? -1 : this.locationAccuracy.ordinal());
    dest.writeByte(this.isWifiCollectionDisabled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.isDeviceModelCollectionDisabled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.isDeviceManufacturerCollectionDisabled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.isOperatingSystemCollectionDisbaled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.isChargingInfoCollectionDisabled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.isCarrierNameCollectionDisabled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.isConnectionTypeCollectionDisabled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.isLocationMethodCollectionDisabled ? (byte) 1 : (byte) 0);
    dest.writeByte(this.isLocationContextCollectionDisabled ? (byte) 1 : (byte) 0);
}
 
Example 2
@Override
public void writeToParcel(Parcel parcel, int flags) {
    final int size = mFields.size();
    final AutofillId[] ids = new AutofillId[size];
    final Pattern[] regexs = new Pattern[size];
    final String[] substs = new String[size];
    Pair<Pattern, String> pair;
    int i = 0;
    for (Entry<AutofillId, Pair<Pattern, String>> entry : mFields.entrySet()) {
        ids[i] = entry.getKey();
        pair = entry.getValue();
        regexs[i] = pair.first;
        substs[i] = pair.second;
        i++;
    }

    parcel.writeParcelableArray(ids, flags);
    parcel.writeSerializable(regexs);
    parcel.writeStringArray(substs);
}
 
Example 3
Source Project: fingen   File: Template.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeLong(this.mAccountID);
    dest.writeLong(this.mDestAccountID);
    dest.writeLong(this.mPayeeID);
    dest.writeLong(this.mCategoryID);
    dest.writeSerializable(this.mAmount);
    dest.writeLong(this.mProjectID);
    dest.writeLong(this.mDepartmentID);
    dest.writeLong(this.mLocationID);
    dest.writeString(this.mName);
    dest.writeString(this.mComment);
    dest.writeSerializable(this.mExchangeRate);
    dest.writeInt(this.mTrType);
}
 
Example 4
Source Project: CountryCurrencyPicker   File: Country.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.code);
    dest.writeString(this.name);
    dest.writeValue(this.flagId);
    dest.writeParcelable(this.currency, flags);
    dest.writeSerializable(this.locale);
}
 
Example 5
Source Project: Mobilyzer   File: TCPThroughputTask.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
  super.writeToParcel(dest, flags);
  dest.writeSerializable(taskProgress);
  dest.writeByte((byte) (stopFlag ? 1 : 0));
  dest.writeLong(duration);
}
 
Example 6
Source Project: Lassi-Android   File: CropImage.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(getOriginalUri(), flags);
    dest.writeParcelable(getUri(), flags);
    dest.writeSerializable(getError());
    dest.writeFloatArray(getCropPoints());
    dest.writeParcelable(getCropRect(), flags);
    dest.writeParcelable(getWholeImageRect(), flags);
    dest.writeInt(getRotation());
    dest.writeInt(getSampleSize());
}
 
Example 7
Source Project: android   File: PlaceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override public void writeToParcel(Parcel parcel, int i) {
  TextUtils.writeToParcel(this.address, parcel, i);
  TextUtils.writeToParcel(this.attributions, parcel, i);
  parcel.writeString(this.id);
  parcel.writeParcelable(this.latLng, i);
  parcel.writeSerializable(this.locale);
  TextUtils.writeToParcel(this.name, parcel, i);
  TextUtils.writeToParcel(this.phoneNumber, parcel, i);
  parcel.writeList(this.placeTypes);
  parcel.writeInt(this.priceLevel);
  parcel.writeFloat(this.rating);
  parcel.writeParcelable(this.viewport, i);
  parcel.writeParcelable(this.websiteUri, i);
}
 
Example 8
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeString(id);
    parcel.writeParcelable(author, flags);
    parcel.writeString(title);
    parcel.writeString(lineOne);
    parcel.writeString(lineTwo);
    parcel.writeString(lineThree);
    parcel.writeInt(votes);
    parcel.writeSerializable(creationTime);
    parcel.writeString(contentUrl);
    parcel.writeString(contentDeepLinkId);
    parcel.writeString(callToActionUrl);
    parcel.writeString(callToActionDeepLinkId);
}
 
Example 9
Source Project: android-sdk   File: BitPayAndroid.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(_baseUrl);
    dest.writeString(_clientName);
    dest.writeSerializable(_tokenCache);
    dest.writeString(getPrivateKey());
}
 
Example 10
Source Project: fingen   File: ProductEntry.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeLong(this.mProductID);
    dest.writeLong(this.mTransactionID);
    dest.writeLong(this.mCategoryID);
    dest.writeLong(this.mProjectID);
    dest.writeSerializable(this.mPrice);
    dest.writeSerializable(this.mQuantity);
    dest.writeByte(this.mSelected ? (byte) 1 : (byte) 0);
}
 
Example 11
Source Project: auid2   File: ToolTab.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mStringResourceId);
    dest.writeInt(mTabId);
    dest.writeSerializable(mToolType);
}
 
Example 12
public void writeToParcel(final Parcel out, final int flags) {
    out.writeString(this.name);
    out.writeString(this.description);
    out.writeSerializable(this.privacy);
}
 
Example 13
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(value.id);
    dest.writeString(value.panFragment);
    dest.writeSerializable(value.type);
}
 
Example 14
Source Project: Mortar-architect   File: ScopeNamer.java    License: MIT License 4 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeSerializable((HashMap<String, Integer>) ids);
}
 
Example 15
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeSerializable(this.file);
    dest.writeInt(this.scrollPos);
}
 
Example 16
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeInt(this.sofarBytes);
    dest.writeSerializable(this.throwable);
}
 
Example 17
@Override
public void writeToParcel(final Parcel dest, final int flags) {
    dest.writeParcelable(mUri, flags);
    dest.writeSerializable(mPriority);
}
 
Example 18
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeSerializable(type);
    out.writeString(url);
}
 
Example 19
Source Project: android_9.0.0_r45   File: Dataset.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeSerializable(pattern);
}
 
Example 20
@Override
public final void writeToParcel(final Parcel dest, final int flags) {
    dest.writeSerializable(topScrollableArea);
    dest.writeSerializable(bottomScrollableArea);
}