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

The following examples show how to use android.os.Parcel#writeSerializable() . 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 File: Template.java    From fingen with 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 2
Source File: CharSequenceTransformation.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@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 File: OpenLocate.java    From openlocate-android with 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 4
Source File: TCPThroughputTask.java    From Mobilyzer with 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 5
Source File: ProductEntry.java    From fingen with 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 6
Source File: BitPayAndroid.java    From android-sdk with 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 7
Source File: Haiku.java    From gplus-haiku-client-android with Apache License 2.0 5 votes vote down vote up
@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 8
Source File: PlaceImpl.java    From android with 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 9
Source File: CropImage.java    From Lassi-Android with 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 10
Source File: Country.java    From CountryCurrencyPicker with 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 11
Source File: SmallMessageSnapshot.java    From FileDownloader with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeInt(this.sofarBytes);
    dest.writeSerializable(this.throwable);
}
 
Example 12
Source File: BreadCrumbLayout.java    From RetroMusicPlayer with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeSerializable(this.file);
    dest.writeInt(this.scrollPos);
}
 
Example 13
Source File: ScopeNamer.java    From Mortar-architect with MIT License 4 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeSerializable((HashMap<String, Integer>) ids);
}
 
Example 14
Source File: CardParcelable.java    From yandex-money-sdk-android with MIT License 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(value.id);
    dest.writeString(value.panFragment);
    dest.writeSerializable(value.type);
}
 
Example 15
Source File: AppGroupCreationContent.java    From kognitivo with Apache License 2.0 4 votes vote down vote up
public void writeToParcel(final Parcel out, final int flags) {
    out.writeString(this.name);
    out.writeString(this.description);
    out.writeSerializable(this.privacy);
}
 
Example 16
Source File: Operation.java    From arca-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void writeToParcel(final Parcel dest, final int flags) {
    dest.writeParcelable(mUri, flags);
    dest.writeSerializable(mPriority);
}
 
Example 17
Source File: BalanceActivity.java    From utexas-utilities with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeSerializable(type);
    out.writeString(url);
}
 
Example 18
Source File: Dataset.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeSerializable(pattern);
}
 
Example 19
Source File: ToolTab.java    From auid2 with 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 20
Source File: ScrollableArea.java    From AndroidMaterialDialog with Apache License 2.0 4 votes vote down vote up
@Override
public final void writeToParcel(final Parcel dest, final int flags) {
    dest.writeSerializable(topScrollableArea);
    dest.writeSerializable(bottomScrollableArea);
}